~certify-web-dev/twisted/certify-staging

« back to all changes in this revision

Viewing changes to twisted/internet/_dumbwin32proc.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-01-02 19:38:17 UTC
  • mfrom: (2.2.4 sid)
  • Revision ID: james.westby@ubuntu.com-20100102193817-jphp464ppwh7dulg
Tags: 9.0.0-1
* python-twisted: Depend on the python-twisted-* 9.0 packages.
* python-twisted: Depend on python-zope.interface only. Closes: #557781.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# -*- test-case-name: twisted.test.test_process -*-
2
 
# Copyright (c) 2001-2008 Twisted Matrix Laboratories.
 
2
# Copyright (c) 2001-2009 Twisted Matrix Laboratories.
3
3
# See LICENSE for details.
4
4
 
5
5
"""
74
74
 
75
75
    @return: a str representing another filename.
76
76
    """
77
 
    f = file(filename, 'ru')
 
77
    f = file(filename, 'rU')
78
78
    if f.read(2) == '#!':
79
79
        exe = f.readline(1024).strip('\n')
80
80
        return exe
205
205
                                    origcmd, sheb))
206
206
                        raise OSError(pwte2)
207
207
 
208
 
        win32file.CloseHandle(self.hThread)
209
 
 
210
208
        # close handles which only the child will use
211
209
        win32file.CloseHandle(hStderrW)
212
210
        win32file.CloseHandle(hStdoutW)
310
308
 
311
309
    def maybeCallProcessEnded(self):
312
310
        if self.closedNotifies == 3 and self.lostProcess:
 
311
            win32file.CloseHandle(self.hProcess)
 
312
            win32file.CloseHandle(self.hThread)
 
313
            self.hProcess = None
 
314
            self.hThread = None
313
315
            BaseProcess.maybeCallProcessEnded(self)
314
316
 
315
317