Commits

Michał Górny committed a15504d

Support 'env' kwarg to VCSSupport.call() once again, fixes svn.

  • Participants
  • Parent commits 921f882

Comments (0)

Files changed (1)

SmartLiveRebuild/vcs/__init__.py

 			from self.callenv. Additional keyword arguments will be
 			passed to subprocess.Popen().
 		"""
-		p = subprocess.Popen(cmd, stdout=subprocess.PIPE, env=self.callenv, **kwargs)
+		env = self.callenv.copy()
+		if 'env' in kwargs:
+			env.update(kwargs['env'])
+		newkwargs = kwargs.copy()
+		newkwargs['env'] = env
+
+		p = subprocess.Popen(cmd, stdout=subprocess.PIPE, **newkwargs)
 		ret = p.communicate()[0].decode(locale.getpreferredencoding(), 'replace')
 		if p.wait() != 0:
 			raise SystemError('Command failed: %s' % cmd)