[Zope-Checkins] SVN: Zope/branches/2.12/ - LP #397861: exporting $PYTHON in generated 'zopectl' for fixing import issue

Andreas Jung andreas at andreas-jung.com
Fri Jul 10 11:09:03 EDT 2009


Log message for revision 101794:
  - LP #397861: exporting $PYTHON in generated 'zopectl' for fixing import issue
    with "bin/zopectl adduser"
  

Changed:
  U   Zope/branches/2.12/doc/CHANGES.rst
  U   Zope/branches/2.12/src/Zope2/Startup/zopectl.py
  U   Zope/branches/2.12/src/Zope2/utilities/skel/bin/zopectl.in

-=-
Modified: Zope/branches/2.12/doc/CHANGES.rst
===================================================================
--- Zope/branches/2.12/doc/CHANGES.rst	2009-07-10 14:54:30 UTC (rev 101793)
+++ Zope/branches/2.12/doc/CHANGES.rst	2009-07-10 15:09:03 UTC (rev 101794)
@@ -28,6 +28,9 @@
 Bugs Fixed
 ++++++++++
 
+- LP #397861: exporting $PYTHON in generated 'zopectl' for fixing import issue
+  with "bin/zopectl adduser"
+
 - PluginIndexes: Added 'indexSize' to IPluggableIndex.
 
 - HelpSys: ProductHelp no longer depends on PluginIndexes initialization.

Modified: Zope/branches/2.12/src/Zope2/Startup/zopectl.py
===================================================================
--- Zope/branches/2.12/src/Zope2/Startup/zopectl.py	2009-07-10 14:54:30 UTC (rev 101793)
+++ Zope/branches/2.12/src/Zope2/Startup/zopectl.py	2009-07-10 15:09:03 UTC (rev 101794)
@@ -129,7 +129,7 @@
             self.sockname = config.runner.socket_name
         else:
             self.sockname = os.path.join(self.clienthome, "zopectlsock")
-        self.python = config.python or sys.executable
+        self.python = os.environ.get('PYTHON', config.python) or sys.executable
         self.zdrun = os.path.join(os.path.dirname(zdaemon.__file__),
                                   "zdrun.py")
         if WIN:
@@ -346,4 +346,4 @@
         # signal handler at all.
         signal.signal(signal.SIGCHLD, _ignoreSIGCHLD)
     exitstatus = main()
-    sys.exit(exitstatus)
+    exit(exitstatus)

Modified: Zope/branches/2.12/src/Zope2/utilities/skel/bin/zopectl.in
===================================================================
--- Zope/branches/2.12/src/Zope2/utilities/skel/bin/zopectl.in	2009-07-10 14:54:30 UTC (rev 101793)
+++ Zope/branches/2.12/src/Zope2/utilities/skel/bin/zopectl.in	2009-07-10 15:09:03 UTC (rev 101794)
@@ -4,6 +4,7 @@
 INSTANCE_HOME="<<INSTANCE_HOME>>"
 CONFIG_FILE="<<INSTANCE_HOME>>/etc/zope.conf"
 export INSTANCE_HOME
+export PYTHON
 
 ZDCTL="<<ZOPE2PATH>>/Startup/zopectl.py"
 



More information about the Zope-Checkins mailing list