Changeset 943 in tailor
- Timestamp:
- 10/20/05 02:30:41 (8 years ago)
- Hash name:
- 20051020003041-97f81-c5f28be1d46fddd957202e3edaf15b2a306095ae
- File:
-
- 1 edited
-
vcpx/shwrap.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
vcpx/shwrap.py
r940 r943 76 76 77 77 def __str__(self): 78 r = '$'+repr(self) 79 if self.cwd: 80 r = self.cwd + ' ' + r 81 return r 82 83 def __repr__(self): 78 84 result = [] 79 if self.cwd:80 result.append(self.cwd)81 result.append(' ')82 result.append('$')83 85 needquote = False 84 86 for arg in self._last_command or self.command: … … 123 125 from sys import stderr 124 126 from locale import getpreferredencoding 125 import os127 from os import environ, getcwd 126 128 from cStringIO import StringIO 127 129 … … 142 144 kwargs['cwd'] = self.cwd 143 145 146 self.log.debug("Executing %r (%r)", self, kwargs.get('cwd', getcwd())) 147 144 148 if not kwargs.has_key('env'): 145 149 env = kwargs['env'] = {} 146 env.update( os.environ)150 env.update(environ) 147 151 148 152 for v in ['LANG', 'TZ', 'PATH']: … … 157 161 # when the caller didn't ask for them. 158 162 if not self.DEBUG: 159 devnull = getattr(os, 'devnull', '/dev/null') 163 try: 164 from os import devnull 165 except ImportError: 166 devnull = '/dev/null' 160 167 if output is None: 161 168 output = open(devnull, 'w')
Note: See TracChangeset
for help on using the changeset viewer.
