From 01f3c218dbaa3e29ff67ba3a2a04eca10443a307 Mon Sep 17 00:00:00 2001
From: Alan De Smet <alan.desmet@ssec.wisc.edu>
Date: Thu, 14 Jul 2016 16:42:03 -0500
Subject: [PATCH] glance --version now returns 0

Previously "glance --version" was treated as an error, and the process's exit code was "9".  Displaying the version isn't an error.
---
 pyglance/glance/compare.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/pyglance/glance/compare.py b/pyglance/glance/compare.py
index b1ab3dc..e3a16a9 100644
--- a/pyglance/glance/compare.py
+++ b/pyglance/glance/compare.py
@@ -1478,9 +1478,10 @@ glance inspectStats A.hdf
 
     # if what the user asked for is not one of our existing functions, print the help
     if ((not args) or (args[0].lower() not in lower_locals)):
-        if not options.version :
-            parser.print_help()
-            help()
+        if options.version:
+            return 0;
+        parser.print_help()
+        help()
         return 9
     else:
         # call the function the user named, given the arguments from the command line, lowercase the request to ignore case
-- 
GitLab