[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [thandy/master] Fix bogus environment for the thp scripts
commit ed65a7d8bc85f219dbeda7d6261671fbdc2172aa
Author: Tomás Touceda <chiiph@xxxxxxxxxxxxxx>
Date: Sat Nov 5 16:56:14 2011 -0300
Fix bogus environment for the thp scripts
---
lib/thandy/packagesys/ThpPackages.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/thandy/packagesys/ThpPackages.py b/lib/thandy/packagesys/ThpPackages.py
index 4745767..8336091 100644
--- a/lib/thandy/packagesys/ThpPackages.py
+++ b/lib/thandy/packagesys/ThpPackages.py
@@ -319,15 +319,15 @@ class ThpPackage(object):
if "scripts" in self._metadata:
if "python2" in self._metadata['scripts']:
for script in self._metadata['scripts']['python2']:
- env = {}
+ env = os.environ.copy()
env['THP_PACKAGE_NAME'] = self._metadata['package_name']
env['THP_OLD_VERSION'] = ""
env['THP_NEW_VERSION'] = self._metadata['package_version']
env['THP_OLD_INSTALL_ROOT'] = ""
env['THP_INSTALL_ROOT'] = os.getenv("THP_INSTALL_ROOT")
env['THP_JSON_FILE'] = json_file
- env['THP_VERBOSE'] = 1
- env['THP_PURGE'] = 0
+ env['THP_VERBOSE'] = "1"
+ env['THP_PURGE'] = "0"
env['THP_TEMP_DIR'] = self._tmp_path
sw = ScriptWrapper(os.path.join(self._tmp_path, "meta",
@@ -383,7 +383,7 @@ class ScriptWrapper(object):
""" Wrapper for the scripts in the Thp package. """
def __init__(self, path = None, env = None):
self._path = path
- self._env = None
+ self._env = env
def run(self):
""" Abstracts how a script is executed. In this case, another
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits