GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||
GeezerVison is showing github.com — Initial TDSX support. by t8y8 · Pull Request #44 · tableau/document-api-python Conversation
Contributor
Lots of duplicated code with TWBX's. But it works. So much so, I wouldn't really want to check this in as-is. I have a vague idea of an ArchiveFile module to hold all the shared logic, or something along those lines. Thoughts? @RussTheAerialist
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 'archivefile' is obviously a terrible name
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
| |||||||||||||||||||||
| xml_file = find_file_in_zip(zf, file_type) | ||
| xml_tree = ET.parse(os.path.join(temp, xml_file)) | ||
| with zipfile.ZipFile(filename) as zf: | ||
| xml_file = zf.open(find_file_in_zip(zf)) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Is this a context object also? Or does it automatically get closed when the zipfile is closed?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
You're right, it needs to be wrapped in a with
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
one small comment about the zt.open usage, but otherwise LGTM. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@benlower @RussTheAerialist alright, the code is feeling much better -- but we have one last chance to call that module something else before merging. Do we want to go with xfile :) ? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.