[egenix-users] Bug in {BeeBase,Misc}/FileLock.py
M.-A. Lemburg
mal at egenix.com
Tue Sep 13 13:03:20 CEST 2005
Rune Froysa wrote:
> 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.
Thanks. Indeed, it looks as if people are not really using mxBeeBase
a lot :-)
We've fixed it some time ago in the (non-final) 2.1 version.
Here's the current snapshot:
http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip
> 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
>
>
> _______________________________________________________________________
> eGenix.com User Mailing List http://www.egenix.com/
> https://www.egenix.com/mailman/listinfo/egenix-users
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Sep 13 2005)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
More information about the egenix-users
mailing list