# HG changeset patch # User Ludovic Chabant # Date 1437350457 25200 # Node ID c5df200354e837c2c5550100a2c0f5b0ad56855f # Parent 750160edefb7a24cf7869ef312ad48b68f91f41d themes: Fix crash when invoking command with no sub-command. diff -r 750160edefb7 -r c5df200354e8 piecrust/commands/builtin/themes.py --- a/piecrust/commands/builtin/themes.py Wed Jul 15 00:00:33 2015 -0700 +++ b/piecrust/commands/builtin/themes.py Sun Jul 19 17:00:57 2015 -0700 @@ -41,6 +41,9 @@ p.set_defaults(sub_func=self._overrideTheme) def checkedRun(self, ctx): + if not hasattr(ctx.args, 'sub_func'): + ctx.parser.parse_args(['themes', '--help']) + return ctx.args.sub_func(ctx) def _createTheme(self, ctx):