[Zope-Checkins] SVN: Zope/trunk/src/Zope2/utilities/mkzopeinstance.py Move interpreter check to where it also catches auto-detected interpreters.

Stefan H. Holek stefan at epy.co.at
Thu Apr 9 11:55:49 EDT 2009


Log message for revision 99044:
  Move interpreter check to where it also catches auto-detected interpreters.

Changed:
  U   Zope/trunk/src/Zope2/utilities/mkzopeinstance.py

-=-
Modified: Zope/trunk/src/Zope2/utilities/mkzopeinstance.py
===================================================================
--- Zope/trunk/src/Zope2/utilities/mkzopeinstance.py	2009-04-09 15:54:09 UTC (rev 99043)
+++ Zope/trunk/src/Zope2/utilities/mkzopeinstance.py	2009-04-09 15:55:49 UTC (rev 99044)
@@ -60,9 +60,6 @@
             skelsrc = os.path.abspath(os.path.expanduser(arg))
         if opt in ("-p", "--python"):
             python = os.path.abspath(os.path.expanduser(arg))
-            if not os.path.exists(python) and os.path.isfile(python):
-                usage(sys.stderr, "The Python interpreter does not exist.")
-                sys.exit(2)
         if opt in ("-h", "--help"):
             usage(sys.stdout)
             sys.exit()
@@ -72,6 +69,10 @@
                 sys.exit(2)
             user, password = arg.split(":", 1)
 
+    if python is not None and not os.path.isfile(python):
+        usage(sys.stderr, "The Python interpreter does not exist.")
+        sys.exit(2)
+
     if not skeltarget:
         # interactively ask for skeltarget and initial user name/passwd.
         # cant set custom instancehome in interactive mode, we default



More information about the Zope-Checkins mailing list