Fix #117: Only open tds/twb inside archives#118
Merged
t8y8 merged 1 commit intotableau:developmentfrom Dec 12, 2016
t8y8:117-fix-cached-twbx
Merged
Fix #117: Only open tds/twb inside archives#118t8y8 merged 1 commit intotableau:developmentfrom t8y8:117-fix-cached-twbx
t8y8 merged 1 commit intotableau:developmentfrom
t8y8:117-fix-cached-twbx
Conversation
Contributor
Author
|
I'm bad, but I wanted the fix in so #117 can be unblocked. I'll owe @RussTheAerialist a drink :) |
Contributor
|
Dang it @t8y8, as long as it's coffee. |
graysonarts
pushed a commit
that referenced
this pull request
Jan 11, 2017
* Fix #117 by only attempting files with the right extension inside the archive (#118) * Commenting and Docstring cleanup. A few very small code cleanups (#120) Add docstrings and remove clutter. I also made some very tiny tweaks to some code for clarity. * Small cleanups for various editors. Play nice with built in test-runners (#121) * Add Py36, update travis to use pycodestyle (#124) * Add `initial sql` and `query band` support (#123) Addresses #109 and #110 * Prep for release of 0.6 (#125) * Prep for release of 0.6 * wordsmithing the changelog
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #117 and verified with a test.
Tableau 9.0 added workbooks that can have an external file cache embedded in the archive. Those workbooks have .key and .bin files. .key files are valid XML and there was a bug in the
find_file_in_zipmethod that would return the first valid XML file it found. Now we only iterate over .twb or /tds files and try to open them (we still validate the root element a layer up). This fixes the bug and should be a little bit faster since we won't be opening as many files.@RussTheAerialist is probably still out but maybe @LGraber can fill in.
(I'm also pretty confidant in the fix, it's small, tested, and I wrote all the original code in this file anyway :) )