Debian Codegraph @

debian/patches/exception_arguments

raw
1 * Add try/except at main function of commands.render module.
2 Index: pystache-0.5.2/pystache/commands/render.py
3 ===================================================================
4 --- pystache-0.5.2.orig/pystache/commands/render.py 2012-08-13 13:52:49.409755422 +0900
5 +++ pystache-0.5.2/pystache/commands/render.py 2012-08-13 13:59:52.460436956 +0900
6 @@ -59,7 +59,14 @@
7 parser = OptionParser(usage=usage)
8 options, args = parser.parse_args(args)
9
10 - template, context = args
11 + try:
12 + template, context = args
13 + except ValueError as e:
14 + print('ERROR: %s' % e)
15 + exit(1)
16 + except UnboundLocalError as e:
17 + print('ERROR: %s' % e)
18 + exit(1)
19
20 return template, context
21