Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch getmtime errors during module reload #1016

Merged
merged 1 commit into from
Feb 3, 2019

Conversation

Pluckerpluck
Copy link
Contributor

On first loading of a module, this catches any errors generated using getmtime() and sets filetime to None. On subsequent reloads it checks filetime to see if it's None, and if it is we assume that the file cannot change and thus does not need to reload.

This does not fix Import UDFs in all cases (as that can break for other reasons), but it does allow the packaging of a module into a zip file for distribution, and not have xlwings immediately crash when it tries to run anything.

There should be no detrimental effect to current functionality.

@fzumstein fzumstein added this to the 0.15.2 milestone Jan 18, 2019
@fzumstein fzumstein merged commit 6e15936 into xlwings:master Feb 3, 2019
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.

2 participants