[glib: 2/4] codegen: Require at least one interface file to be specified



commit 8f4155c12426b2c042db83dbf4797ca74ae1fb13
Author: Philip Withnall <withnall endlessm com>
Date:   Mon Dec 2 14:08:48 2019 +0000

    codegen: Require at least one interface file to be specified
    
    Previously, running `gdbus-codegen` with no arguments would exit
    successfully with no output. While technically correct, that seems
    unhelpful.
    
    Require at least one interface file to be specified, so the user gets an
    error message if they don’t specify any.
    
    Signed-off-by: Philip Withnall <withnall endlessm com>

 gio/gdbus-2.0/codegen/codegen_main.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gio/gdbus-2.0/codegen/codegen_main.py b/gio/gdbus-2.0/codegen/codegen_main.py
index 7683f0af5..e77ad5569 100644
--- a/gio/gdbus-2.0/codegen/codegen_main.py
+++ b/gio/gdbus-2.0/codegen/codegen_main.py
@@ -149,7 +149,7 @@ def apply_annotations(iface_list, annotation_list):
 
 def codegen_main():
     arg_parser = argparse.ArgumentParser(description='D-Bus code and documentation generator')
-    arg_parser.add_argument('files', metavar='FILE', nargs='*',
+    arg_parser.add_argument('files', metavar='FILE', nargs='+',
                             help='D-Bus introspection XML file')
     arg_parser.add_argument('--xml-files', metavar='FILE', action='append', default=[],
                             help=argparse.SUPPRESS)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]