Browse Source

Add show version for murano-pkg-check

Now murano-pkg-check can not show the version,
This patch add this.

Change-Id: I4a44c0edda4c6def2584c10bebd20b7da104408b
zhurong 2 years ago
parent
commit
818bf1a548
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      muranopkgcheck/cmd/run.py

+ 6
- 0
muranopkgcheck/cmd/run.py View File

@@ -18,6 +18,7 @@ import sys
18 18
 
19 19
 import six
20 20
 
21
+import muranopkgcheck
21 22
 from muranopkgcheck import log
22 23
 from muranopkgcheck import manager
23 24
 
@@ -66,6 +67,11 @@ def parse_cli_args(args=None):
66 67
                         type=str,
67 68
                         help='Path to package or catalog')
68 69
 
70
+    parser.add_argument('--version',
71
+                        action='version',
72
+                        version=muranopkgcheck.__version__,
73
+                        help="Show program's version number and exit.")
74
+
69 75
     return parser.parse_args(args=args)
70 76
 
71 77
 

Loading…
Cancel
Save