daa4a42 Fixes lp710789 - use-optparse breaks daemonized process stop

Authored and Committed by jaypipes@gmail.com 13 years ago
    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.
    
        
file modified
+1 -1
file modified
+1 -1
file modified
+2 -1