Ticket #5362: winlockfile2.patch

File winlockfile2.patch, 573 bytes (added by Antoine Pitrou, 9 years ago)
  • twisted/python/lockfile.py

    diff --git a/twisted/python/lockfile.py b/twisted/python/lockfile.py
    a b import errno, os 
    1313
    1414from time import time as _uniquefloat
    1515
     16from twisted.python.runtime import platform
     17
    1618def unique():
    1719    return str(long(_uniquefloat() * 1000))
    1820
    1921from os import rename
    20 try:
     22if not platform.isWindows():
    2123    from os import kill
    2224    from os import symlink
    2325    from os import readlink
    2426    from os import remove as rmlink
    2527    _windows = False
    26 except:
     28else:
    2729    _windows = True
    2830
    2931    try: