[egenix-users] Bug in {BeeBase,Misc}/FileLock.py

Rune Froysa rune.froysa at usit.uio.no
Tue Sep 13 12:32:37 CEST 2005


I needed a lockfile implementation to prevent two instances of a
script from running at the same time, and the FileLock module seems to
fit my needs perfectly.  I'm a bit surprised that this bug
(TypeError: not all arguments converted) hasn't been encountered
earlier.

diff -u --recursive egenix-mx-base-2.0.6.orig/mx/BeeBase/FileLock.py egenix-mx-base-2.0.6/mx/BeeBase/FileLock.py
--- egenix-mx-base-2.0.6.orig/mx/BeeBase/FileLock.py    2001-06-24 13:54:25.000000000 +0200
+++ egenix-mx-base-2.0.6/mx/BeeBase/FileLock.py 2005-09-13 11:23:39.229964215 +0200
@@ -156,7 +156,7 @@
                             continue
                 raise Error,\
                       'file "%s" is locked by process %s:%i' % \
-                      (self.filename,host,locking_pid,hostname)
+                      (self.filename,host,locking_pid)
         self.locked = 1
 
     def unlock(self,sleeptime=0.0001,
Only in egenix-mx-base-2.0.6/mx/BeeBase: FileLock.py~
diff -u --recursive egenix-mx-base-2.0.6.orig/mx/Misc/FileLock.py egenix-mx-base-2.0.6/mx/Misc/FileLock.py
--- egenix-mx-base-2.0.6.orig/mx/Misc/FileLock.py       2001-06-24 13:54:29.000000000 +0200
+++ egenix-mx-base-2.0.6/mx/Misc/FileLock.py    2005-09-13 11:23:47.715743293 +0200
@@ -156,7 +156,7 @@
                             continue
                 raise Error,\
                       'file "%s" is locked by process %s:%i' % \
-                      (self.filename,host,locking_pid,hostname)
+                      (self.filename,host,locking_pid)
         self.locked = 1
 
     def unlock(self,sleeptime=0.0001,

/Rune



More information about the egenix-users mailing list