flupke / rainbow-saddle

A wrapper around gunicorn to handle graceful restarts correctly
48 stars 12 forks source link

Use a read/write mode for the gunicorn pidfile that works in all Pythons #7

Closed justinlocsei closed 8 years ago

justinlocsei commented 8 years ago

First of all, thanks for this project! I'm using rainbow-saddle with Python 3 and the --gunicorn-pidfile option, and the 'rw' mode used to open that file causes an error in Python 3. Specifically, it raises ValueError: must have exactly one of create/read/write/append mode. This PR changes the open call to use the 'r+' mode, which opens the file for reading and writing in Python 2 and 3, ensuring that the write permissions check is still applied.

flupke commented 8 years ago

Thanks for contributing! Do you need me to do a minor release on pypi?

justinlocsei commented 8 years ago

A minor release on pypi would be wonderful. Thank you!

flupke commented 8 years ago

There you go, just released 0.3.1

justinlocsei commented 8 years ago

Awesome. Thanks again!