[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[minion-cvs] Resist weirdness when unlocking client lock



Update of /home/minion/cvsroot/src/minion/lib/mixminion
In directory moria.mit.edu:/tmp/cvs-serv5185/lib/mixminion

Modified Files:
	Common.py 
Log Message:
Resist weirdness when unlocking client lock

Index: Common.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/Common.py,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -d -r1.71 -r1.72
--- Common.py	5 May 2003 00:38:45 -0000	1.71
+++ Common.py	5 May 2003 00:41:57 -0000	1.72
@@ -1004,8 +1004,15 @@
             return
         try:
             os.unlink(self.filename)
+        except OSError:
+            pass
+        try:
             fcntl.flock(self.fd, fcntl.LOCK_UN)
+        except OSError:
+            pass
+        try:
             os.close(self.fd)
-            self.fd = None
         except OSError:
             pass
+
+        self.fd = None