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

FIX - Passing compiled modules to traceback_exclude_modules #119

Merged
merged 5 commits into from
Jun 8, 2017
Merged

FIX - Passing compiled modules to traceback_exclude_modules #119

merged 5 commits into from
Jun 8, 2017

Conversation

kobim
Copy link
Contributor

@kobim kobim commented Jun 7, 2017

Configure.traceback_exclude_modules receives a list of modules, and extracts the __file__ of each, allowing to skip few modules from appearing in the stacktrace.
In Python 2.x, when a compiled module is loaded, it's __file__ property displays the compiled .pyc path, while the running code will appear in the stacktrace with a .py suffix.

This fix replaces the .pyc suffix with a .py, hence enabling the traceback_exclude_modules to work as it should.

I also added tests reproducing this scenario, and also tweaked .travis.yml to support the new image they deployed recently (https://blog.travis-ci.com/2017-05-04-precise-image-updates).

@kattrali
Copy link
Contributor

kattrali commented Jun 7, 2017

Thank you for the very thorough report and patch, @kobim. Looking it over now.

@kattrali kattrali merged commit 1255b42 into bugsnag:master Jun 8, 2017
@kattrali
Copy link
Contributor

kattrali commented Jun 8, 2017

Looks great! Thanks for updating the CI config as well. 🎉

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