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

futurize always exits with error code 1 #119

Closed
bukzor opened this issue Oct 16, 2014 · 2 comments
Closed

futurize always exits with error code 1 #119

bukzor opened this issue Oct 16, 2014 · 2 comments

Comments

@bukzor
Copy link

bukzor commented Oct 16, 2014

I'd like to use futurize as a linter of sorts, using its exit code to tell me when futurize detected that changes should be made (or were made, in the case of -w).

Currently, it seems to always exit with code 1.
I also notice that the last line printed is always 0, and doesn't seem to vary.
Thirdly, I sometimes see a "file x needs to be modified" even when no patches were suggested.

These issues combined mean that I can't achieve my above goal of using futurize as a 2+3 linter.

@edschofield
Copy link
Contributor

Thanks for the report, Buck!

This was caused by a bug in Python 2.7’s sys.exit() which always exits with 1 status when a long integer is passed to it, as in sys.exit(long(0)).

I have fixed this in the v0.14.x maintenance branch and will release v0.14.2 shortly.

edschofield added a commit that referenced this issue Nov 10, 2014
It seems that sys.exit(newint) (and other longs) always returns 1!
edschofield added a commit that referenced this issue Nov 10, 2014
@edschofield
Copy link
Contributor

Fixed in v0.14.2.

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

No branches or pull requests

2 participants