parser=argparse.ArgumentParser(description='An intercepting proxy for testing web applications.')
parser.add_argument('-l','--lite',help='Run the proxy in "lite" mode',action='store_true')
parser.add_argument('-c','--crypt',type=str,nargs='?',help='Start pappy in "crypto" mode, optionally supply a name for the encrypted project archive [CRYPT]')
try:
parser.add_argument('-c','--crypt',type=str,nargs=1,help='Start pappy in "crypto" mode, must supply a name for the encrypted project archive [CRYPT]')
except:
print'Must supply a project name: pappy -c <project_name>'
reactor.stop()
defer.returnValue(None)
args=parser.parse_args(sys.argv[1:])
settings={}
@ -186,9 +196,8 @@ def parse_args():
settings['lite']=False
ifargs.crypt:
settings['crypt']=args.crypt
elifargs.crypt=="":
settings['crypt']='project.crypt'
# Convert from single-item list produced by argparse `nargs=1`