Ticket #3413: nasty-hacks.diff
| File nasty-hacks.diff, 2.2 KB (added by glyph, 5 years ago) |
|---|
-
twisted/python/reflect.py
288 288 289 289 def qual(clazz): 290 290 """Return full import path of a class.""" 291 return clazz.__module__ + '.' + clazz.__name__ 291 if hasattr(clazz, '__module__'): 292 return clazz.__module__ + '.' + clazz.__name__ 293 else: 294 return clazz.__name__ 292 295 293 296 def getcurrent(clazz): 294 297 assert type(clazz) == types.ClassType, 'must be a class...' -
twisted/python/lockfile.py
24 24 from os import remove as rmlink 25 25 _windows = False 26 26 except: 27 import traceback 28 traceback.print_exc() 27 29 _windows = True 28 from win32api import OpenProcess29 import pywintypes30 30 31 31 ERROR_ACCESS_DENIED = 5 32 32 ERROR_INVALID_PARAMETER = 87 … … 34 34 _open = file 35 35 36 36 def kill(pid, signal): 37 import pywintypes 38 from win32api import OpenProcess 37 39 try: 38 40 OpenProcess(0, 0, pid) 39 41 except pywintypes.error, e: -
twisted/python/win32.py
31 31 """ 32 32 return getattr(exceptions, 'WindowsError', FakeWindowsError) 33 33 34 class FakeWindowsError( OSError):34 class FakeWindowsError(Exception): 35 35 """ 36 36 Stand-in for sometimes-builtin exception on platforms for which it 37 37 is missing. -
twisted/application/app.py
2 2 # Copyright (c) 2001-2008 Twisted Matrix Laboratories. 3 3 # See LICENSE for details. 4 4 5 import sys, os, pdb, getpass, traceback, signal,warnings5 import sys, os, pdb, getpass, traceback, warnings 6 6 7 7 from twisted.python import runtime, log, usage, failure, util, logfile 8 8 from twisted.python.versions import Version
