Fix cython -v error when no source files given.
authorRobert Bradshaw <robertwb@math.washington.edu>
Fri, 1 Feb 2008 21:03:56 +0000 (13:03 -0800)
committerRobert Bradshaw <robertwb@math.washington.edu>
Fri, 1 Feb 2008 21:03:56 +0000 (13:03 -0800)
Reported by gpk@kochanski.org

Cython/Compiler/CmdLine.py

index 703ea2c11ea12e13abd83d632fb024fff39c4ea2..ce268606df79ff42d60c7bb32998349613042947 100644 (file)
@@ -111,7 +111,7 @@ def parse_command_line(args):
         print >>sys.stderr, \
             "cython: Only one source file allowed when using -o"
         sys.exit(1)
-    if len(sources) == 0:
+    if len(sources) == 0 and not options.show_version:
         bad_usage()
     return options, sources