-
Committer:
jaypipes at gmail
-
Date:
2011-01-31 18:21:30 UTC
-
Revision ID:
jaypipes@gmail.com-20110131182130-4g5y3yshqbqtuk20
Fixes lp710789 - use-optparse breaks daemonized process stop
Fix was simple. args = FLAGS(argv) returns ALL argv's including
the program name. optparse.OptionParser.parse_args() does not
return the program name as args[0], instead it returns args[1:].
In glance.common.server.serve(), we were checking:
action = 'start':
if len(args) > 1:
action = args.pop()
Changing this to if len(args): fixed the problem.