Sophie

Sophie

distrib > Mageia > 6 > x86_64 > by-pkgid > 57f615fceee8377cc9845e631c64ee4d > files > 2

cxxtest-3.10.1-7.mga6.src.rpm

diff --git a/cxxtestgen.py b/cxxtestgen.py
--- a/cxxtestgen.py
+++ b/cxxtestgen.py
@@ -70,14 +70,17 @@
 def abort( problem ):
     '''Print error message and exit'''
     sys.stderr.write( '\n' )
-    sys.stderr.write( problem )
+    if type(problem).__name__ == 'GetoptError':
+	    sys.stderr.write( problem[0] )
+    else:
+      sys.stderr.write( problem )
     sys.stderr.write( '\n\n' )
     sys.exit(2)
 
 def parseCommandline():
     '''Analyze command line arguments'''
     try:
-        options, patterns = getopt.getopt( sys.argv[1:], 'o:r:',
+        options, patterns = getopt.getopt( sys.argv[1:], 'o:r:v',
                                            ['version', 'output=', 'runner=', 'gui=',
                                             'error-printer', 'abort-on-fail', 'have-std', 'no-std',
                                             'have-eh', 'no-eh', 'template=', 'include=',