[CalendarServer-changes] [9376] CalendarServer/trunk

source_changes at macosforge.org source_changes at macosforge.org
Wed Jun 20 11:05:22 PDT 2012


Revision: 9376
          http://trac.macosforge.org/projects/calendarserver/changeset/9376
Author:   sagen at apple.com
Date:     2012-06-20 11:05:22 -0700 (Wed, 20 Jun 2012)
Log Message:
-----------
Deal with envvars containing newlines

Modified Paths:
--------------
    CalendarServer/trunk/bin/_calendarserver_preamble.py
    CalendarServer/trunk/run

Modified: CalendarServer/trunk/bin/_calendarserver_preamble.py
===================================================================
--- CalendarServer/trunk/bin/_calendarserver_preamble.py	2012-06-20 02:10:22 UTC (rev 9375)
+++ CalendarServer/trunk/bin/_calendarserver_preamble.py	2012-06-20 18:05:22 UTC (rev 9376)
@@ -45,7 +45,7 @@
     stdout, stderr = child.communicate()
     stdout = stdout.rstrip("\n")
 
-    evars = dict(line.split("=", 1) for line in stdout.split("\n"))
+    evars = eval(stdout)
     os.environ.update(evars)
 
     # PYTHONPATH needs special treatment, because Python has already processed

Modified: CalendarServer/trunk/run
===================================================================
--- CalendarServer/trunk/run	2012-06-20 02:10:22 UTC (rev 9375)
+++ CalendarServer/trunk/run	2012-06-20 18:05:22 UTC (rev 9376)
@@ -228,7 +228,7 @@
   # asked to print the path.
   if "${print_path}"; then
     if "${print_environment}"; then
-      env;
+      "${PYTHON}" -c "import os; print repr(dict(os.environ))"
     else
       echo "${PYTHONPATH}";
     fi;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120620/08263746/attachment.html>


More information about the calendarserver-changes mailing list