Ticket #1640: twisted-fix-1640.patch

File twisted-fix-1640.patch, 1.5 KB (added by bwh, 9 years ago)

patch against v2.1.0

  • win32eventreactor.py

    RCS file: /project/ci/cvsroot/v5/src/tools/test_sshd/win32eventreactor.py,v
    retrieving revision 1.1
    retrieving revision 1.2
    diff -u -r1.1 -r1.2
     
    197197 
    198198    doIteration = doWaitForMultipleEvents 
    199199 
    200     def spawnProcess(self, processProtocol, executable, args=(), env={}, path=None, usePTY=0): 
     200    def spawnProcess(self, processProtocol, executable, args=(), env=None, path=None, usePTY=0): 
    201201        """Spawn a process.""" 
    202202        Process(self, processProtocol, executable, args, env, path) 
    203203 
     
    242242 
    243243    buffer = '' 
    244244 
    245     def __init__(self, reactor, protocol, command, args, environment, path): 
     245    def __init__(self, reactor, protocol, command, args, env, path): 
    246246        self.reactor = reactor 
    247247        self.protocol = protocol 
    248248 
     
    277277        win32file.CloseHandle(self.hStdinW) 
    278278        self.hStdinW = tmp 
    279279 
    280         # Add the specified environment to the current environment - this is 
    281         # necessary because certain operations are only supported on Windows 
    282         # if certain environment variables are present. 
    283         env = os.environ.copy() 
    284         env.update(environment or {}) 
     280        if env is None: 
     281            env = os.environ 
    285282 
    286283        # create the process 
    287284        cmdline = ' '.join([_cmdLineQuote(a) for a in args])