Skip to content

Conversation

@michaelaye
Copy link
Contributor

I added a try/except catch for the lack of an installed openpyxl. The user gets a nice message that she needs to install it or to save the .xlsx file as .xls.
I also added a test for it and a test.xlsx file that I saved from test.xls.
Furthermore I noticed an ugly break of the DRY principle in ExcelFile.parse and gave an alternative with a nice dictionary that provides the handle for the required method depending on the 'use_xlsx' flag.

…e saved from test.xls. Beautified ugly break of DRY principle in ExcelFile.parse
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was not sure how to get out of the Exception Handling? Let me know if you desire something else.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think returning None is appropriate in this case; an exception should be raised (with the more helpful error message)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, fixed that. How cool that github automatically adds that commit to this pull request! I guess pull requests are related to the branch, so when I change the branch it will be included in the pull request? (I am still new to githubbing.. ;)

@wesm wesm closed this Apr 10, 2012
@wesm
Copy link
Member

wesm commented Apr 10, 2012

thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants