While doing some unrelated testing, I found this module throwing a
syntax error on a RHEL 5.6 VM on the line using the "except foo as bar"
style.  Switching to use the "," stylem and just pulling .code directly
seems to be an easy fix.

Note: I didn't do any deep RCA or anything, and only simple testing of
this fix.  Both probably deserve a closer look.

Signed-off-by: Chris Evich <[email protected]>
---
 client/bin/cmdparser.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/client/bin/cmdparser.py b/client/bin/cmdparser.py
index abcdfe5..7ef6c73 100644
--- a/client/bin/cmdparser.py
+++ b/client/bin/cmdparser.py
@@ -133,8 +133,8 @@ class CommandParser(object):
                 args = getattr(self, cmd)(args)
             except TypeError:
                 args = getattr(self, cmd)()
-        except SystemExit as return_code:
-            sys.exit(return_code)
+        except SystemExit, return_code:
+            sys.exit(return_code.code)
         except Exception, error_detail:
             if DEBUG:
                 raise
-- 
1.7.1

_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to