Skip to content

Commit

Permalink
Merge pull request #2119 from mmerickel/fix/prevent-reload-daemon
Browse files Browse the repository at this point in the history
abort when using reload with daemon
  • Loading branch information
digitalresistor committed Nov 13, 2015
2 parents a6b316a + 03465e7 commit bd52b68
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,10 @@ Bug Fixes
- Fixed usage of ``pserve --monitor-restart --daemon`` which would fail in
horrible ways. See https://github.com/Pylons/pyramid/pull/2118

- Explicitly prevent ``pserve --reload --daemon`` from being used. It's never
been supported but would work and fail in weird ways.
See https://github.com/Pylons/pyramid/pull/2119

Deprecations
------------

Expand Down
4 changes: 4 additions & 0 deletions pyramid/scripts/pserve.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,10 @@ def run(self): # pragma: no cover
cmd = None

if self.options.reload:
if self.options.daemon or cmd in ('start', 'stop', 'restart'):
self.out(
'Error: Cannot use reloading while running as a dameon.')
return 2
if os.environ.get(self._reloader_environ_key):
if self.options.verbose > 1:
self.out('Running reloading file monitor')
Expand Down

0 comments on commit bd52b68

Please sign in to comment.