diff options
| author | bwarsaw | 2006-04-15 22:58:13 +0000 |
|---|---|---|
| committer | bwarsaw | 2006-04-15 22:58:13 +0000 |
| commit | 592feaed3c2fbc9e0c8489805f818b6a9d5b13b8 (patch) | |
| tree | 2a7e0afd65fd0a751a53489e6d3d2eaf973be2a1 /Mailman/LockFile.py | |
| parent | fdd34dfe8926c22353e8b6defd4d538a52f4cc00 (diff) | |
| download | mailman-592feaed3c2fbc9e0c8489805f818b6a9d5b13b8.tar.gz mailman-592feaed3c2fbc9e0c8489805f818b6a9d5b13b8.tar.zst mailman-592feaed3c2fbc9e0c8489805f818b6a9d5b13b8.zip | |
Diffstat (limited to 'Mailman/LockFile.py')
| -rw-r--r-- | Mailman/LockFile.py | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/Mailman/LockFile.py b/Mailman/LockFile.py index 9b5b05f0c..cc010ce5e 100644 --- a/Mailman/LockFile.py +++ b/Mailman/LockFile.py @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2003 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2006 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -59,11 +59,12 @@ tempfile.mktemp()). # for unit testing. import os -import socket import time import errno import random +import socket import traceback + from stat import ST_NLINK, ST_MTIME # Units are floating-point seconds. @@ -71,12 +72,6 @@ DEFAULT_LOCK_LIFETIME = 15 # Allowable a bit of clock skew CLOCK_SLOP = 10 -try: - True, False -except NameError: - True = 1 - False = 0 - # Figure out what logfile to use. This is different depending on whether @@ -195,7 +190,7 @@ class LockFile: self.__logprefix = os.path.split(self.__lockfile)[1] # For transferring ownership across a fork. self.__owned = True - + def __repr__(self): return '<LockFile %s: %s [%s: %ssec] pid=%s>' % ( id(self), self.__lockfile, |
