diff roundup/backends/portalocker.py @ 1459:7e0bbefb2a72

reversing the "make it nicer" checkin
author Richard Jones <richard@users.sourceforge.net>
date Thu, 20 Feb 2003 22:56:49 +0000
parents 1159963f769c
children eeb167fb8faf
line wrap: on
line diff
--- a/roundup/backends/portalocker.py	Thu Feb 20 07:14:26 2003 +0000
+++ b/roundup/backends/portalocker.py	Thu Feb 20 22:56:49 2003 +0000
@@ -2,7 +2,7 @@
 #                  Requires python 1.5.2 or better.
 
 # ID line added by richard for Roundup file tracking
-# $Id: portalocker.py,v 1.4 2003-02-14 00:08:32 richard Exp $
+# $Id: portalocker.py,v 1.5 2003-02-20 22:56:49 richard Exp $
 
 """ Cross-platform (posix/nt) API for flock-style file locking.
 
@@ -67,7 +67,7 @@
         # Try LockFileEx first, as it has more functionality and handles
         # blocking locks more efficiently.
         try:
-            win32file.LockFileEx(hfile, flags, 0, 0xffff0000L, __overlapped)
+            win32file.LockFileEx(hfile, flags, 0, 0xffff0000, __overlapped)
         except win32file.error, e:
             import winerror
             # Propagate upwards all exceptions other than not-implemented.
@@ -82,14 +82,14 @@
                 warnings.warn("PortaLocker does not support shared locking on Win9x", RuntimeWarning)
             # LockFile only supports immediate-fail locking.
             if flags & LOCK_NB:
-                win32file.LockFile(hfile, 0, 0, 0xffff0000L, 0)
+                win32file.LockFile(hfile, 0, 0, 0xffff0000, 0)
             else:
                 # Emulate a blocking lock with a polling loop.
                 import time
                 while 1:
                     # Attempt a lock.
                     try:
-                        win32file.LockFile(hfile, 0, 0, 0xffff0000L, 0)
+                        win32file.LockFile(hfile, 0, 0, 0xffff0000, 0)
                         break
                     except win32file.error, e:
                         # Propagate upwards all exceptions other than lock violation.
@@ -104,7 +104,7 @@
         # UnlockFileEx is not supported on all Win32 platforms (Win95, Win98, WinME).
         # If it's not supported, win32file will raise an api_error exception.
         try:
-            win32file.UnlockFileEx(hfile, 0, 0xffff0000L, __overlapped)
+            win32file.UnlockFileEx(hfile, 0, 0xffff0000, __overlapped)
         except win32file.error, e:
             import winerror
             # Propagate upwards all exceptions other than not-implemented.
@@ -113,7 +113,7 @@
             
             # UnlockFileEx is not supported. Use UnlockFile.
             # Care: the low/high length params are reversed compared to UnLockFileEx.
-            win32file.UnlockFile(hfile, 0, 0, 0xffff0000L, 0)
+            win32file.UnlockFile(hfile, 0, 0, 0xffff0000, 0)
 
 elif os.name =='posix':
     def lock(file, flags):

Roundup Issue Tracker: http://roundup-tracker.org/