comparison piecrust/main.py @ 7:343d08ef5668

More PieCrust 3 fixes, and a couple of miscellaneous bug fixes.
author Ludovic Chabant <ludovic@chabant.com>
date Sat, 16 Aug 2014 15:07:22 -0700
parents f485ba500df3
children 091f99bfbe44
comparison
equal deleted inserted replaced
6:f5ca5c5bed85 7:343d08ef5668
133 parser.add_argument('--no-cache', help="When applicable, disable caching.", action='store_true') 133 parser.add_argument('--no-cache', help="When applicable, disable caching.", action='store_true')
134 parser.add_argument('--quiet', help="Print only important information.", action='store_true') 134 parser.add_argument('--quiet', help="Print only important information.", action='store_true')
135 parser.add_argument('--log', help="Send log messages to the specified file.") 135 parser.add_argument('--log', help="Send log messages to the specified file.")
136 136
137 commands = sorted(app.plugin_loader.getCommands(), 137 commands = sorted(app.plugin_loader.getCommands(),
138 lambda a, b: cmp(a.name, b.name)) 138 key=lambda c: c.name)
139 subparsers = parser.add_subparsers() 139 subparsers = parser.add_subparsers()
140 for c in commands: 140 for c in commands:
141 p = subparsers.add_parser(c.name, help=c.description) 141 p = subparsers.add_parser(c.name, help=c.description)
142 c.setupParser(p, app) 142 c.setupParser(p, app)
143 p.set_defaults(func=c._runFromChef) 143 p.set_defaults(func=c._runFromChef)