[sysadmin-bin] The -l and -i flag are mutually exclusive on rpm-signer. Make also sure we print the help of the com



commit 3bedaa95090759a2c2b40fa917f1bb3083fa48a0
Author: Andrea Veri <averi redhat com>
Date:   Fri Oct 21 18:51:39 2016 +0200

    The -l and -i flag are mutually exclusive on rpm-signer. Make also sure we print the help of the command 
in case a config file is specificed but no actions are

 rpm-signer.py |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/rpm-signer.py b/rpm-signer.py
index 3254320..62eca26 100755
--- a/rpm-signer.py
+++ b/rpm-signer.py
@@ -134,9 +134,14 @@ def main():
 
     if options.install:
         install_package()
-
-    if options.list_signatures:
+    elif options.list_signatures:
         list_rpm_files_signature()
+    elif options.install and options.list_signatures:
+        print 'The -i and -l flags are mutually exclusive'
+        sys.exit(1)
+    else:
+        parser.print_help()
+        sys.exit(1)
 
 if __name__ == "__main__":
     main()


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