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.
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 raisesValueError: must have exactly one of create/read/write/append mode
. This PR changes theopen
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.