diff options
author | Will Thompson <will@willthompson.co.uk> | 2018-06-25 09:33:01 +0100 |
---|---|---|
committer | Will Thompson <will@willthompson.co.uk> | 2018-06-25 09:33:01 +0100 |
commit | 4cf60ececf070ce96c0266f0a79adb13bf3069aa (patch) | |
tree | d0e71f8fdd938f7496298bee5f3b96b10bca0e96 | |
parent | a93ecc20045b8faa129fd32d2663624429851949 (diff) | |
download | glib-mkenums-args-order.tar.gz |
glib-mkenums: require at least one input fileglib-mkenums-args-order
Previously, the behaviour if you supplied no input files was to crash:
Traceback (most recent call last):
File "/usr/bin/glib-mkenums", line 420, in <module>
base = os.path.basename(options.args[0])
IndexError: list index out of range
While in theory you might want to supply no input files, it is much more
likely to be a misconfiguration of the build process. Since this has
never worked, let's make that explicit:
glib-mkenums: error: the following arguments are required: args
-rwxr-xr-x | gobject/glib-mkenums.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gobject/glib-mkenums.in b/gobject/glib-mkenums.in index 1d2052ce7..07b1d3e0a 100755 --- a/gobject/glib-mkenums.in +++ b/gobject/glib-mkenums.in @@ -325,7 +325,7 @@ parser.add_argument('--template', default='', dest='template', parser.add_argument('--output', default=None, dest='output') parser.add_argument('--version', '-v', default=False, action='store_true', dest='version', help='Print version informations') -parser.add_argument('args', nargs='*') +parser.add_argument('args', nargs='+') options = parser.parse_args() |