Skip to content

Commit

Permalink
Merge pull request Pylons#661 from k-j-kleist/master
Browse files Browse the repository at this point in the history
add optparse option "--stop-daemon" only if appropriate
  • Loading branch information
mcdonc committed Aug 19, 2012
2 parents 33bd537 + 84362da commit 0bdaa91
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions pyramid/scripts/pserve.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,13 @@ class PServeCommand(object):
metavar="GROUP",
help="Set the group (usually only possible when run as root)")

parser.add_option(
'--stop-daemon',
dest='stop_daemon',
action='store_true',
help=('Stop a daemonized server (given a PID file, or default '
'pyramid.pid file)'))
if hasattr(os, 'fork'):
parser.add_option(
'--stop-daemon',
dest='stop_daemon',
action='store_true',
help=('Stop a daemonized server (given a PID file, or default '
'pyramid.pid file)'))

_scheme_re = re.compile(r'^[a-z][a-z]+:', re.I)

Expand Down

0 comments on commit 0bdaa91

Please sign in to comment.