[Swift-commit] r4820 - SwiftApps/GOSwift/pykoa/tools

jonmon at ci.uchicago.edu jonmon at ci.uchicago.edu
Wed Jul 13 20:09:43 CDT 2011


Author: jonmon
Date: 2011-07-13 20:09:43 -0500 (Wed, 13 Jul 2011)
New Revision: 4820

Modified:
   SwiftApps/GOSwift/pykoa/tools/koa_goswift.py
Log:
exit early if no sites are specified


Modified: SwiftApps/GOSwift/pykoa/tools/koa_goswift.py
===================================================================
--- SwiftApps/GOSwift/pykoa/tools/koa_goswift.py	2011-07-12 19:58:49 UTC (rev 4819)
+++ SwiftApps/GOSwift/pykoa/tools/koa_goswift.py	2011-07-14 01:09:43 UTC (rev 4820)
@@ -157,6 +157,11 @@
 def main( argv=sys.argv[1:] ):
     (parser, options, args) = setup_opts(argv)
 
+    # If I did not specify at least one site, print help message
+    if len(args) < 1:
+        parser.print_help()
+        return 1
+
     # Not sure what these lines do yet, just copied from koa-ly.py
     guc_util.init_guc_env()
 
@@ -164,11 +169,6 @@
     user_row = pykoa.tools.cli_get_user( conn )
     user_id  = user_row.id
 
-    # If I did not specify at least one site, print help message
-    if len(args) < 1:
-        parser.print_help()
-        return 1
-
     # get the swift input package
     ( tc, sites, config, script ) = parse_stdin()
 




More information about the Swift-commit mailing list