[Pkg-mailman-hackers] Pkg-mailman commit - rev 84 - branches/pkg-split/core/debian/snippets

Bernd S. Brentrup bsb@haydn.debian.org
Fri, 23 Apr 2004 12:09:41 -0600


Author: bsb
Date: 2004-04-23 12:09:25 -0600 (Fri, 23 Apr 2004)
New Revision: 84

Modified:
   branches/pkg-split/core/debian/snippets/maint_helpers.py
Log:
Make dir to prepend to path optional.debian/snippets/maint_helpers.py


Modified: branches/pkg-split/core/debian/snippets/maint_helpers.py
===================================================================
--- branches/pkg-split/core/debian/snippets/maint_helpers.py	2004-04-23 12:04:16 UTC (rev 83)
+++ branches/pkg-split/core/debian/snippets/maint_helpers.py	2004-04-23 18:09:25 UTC (rev 84)
@@ -102,8 +102,8 @@
     """
     """#
 
-    def __init__(self, sys_dir):
-        self._prepend = sys_dir
+    def __init__(self, prepend=None):
+        self._prepend = prepend
 
 
     def run(self, cmd, *args):
@@ -113,7 +113,8 @@
         sys_argv    = sys.argv[:]
         sys_path    = sys.path[:]
         sys.argv    = [cmd] + list(args)
-        sys.path.insert(0, self._prepend)
+        if self._prepend:
+            sys.path.insert(0, self._prepend)
         execfile(cmd, gbls)
         sys.path    = sys_path
         sys.argv    = sys_argv