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

[minion-cvs] Resist weirdness when unlocking client lock (backport)



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

Modified Files:
      Tag: mixminion-v0-0-3-patches
	Common.py 
Log Message:
Resist weirdness when unlocking client lock (backport)

Index: Common.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/Common.py,v
retrieving revision 1.66.2.1
retrieving revision 1.66.2.2
diff -u -d -r1.66.2.1 -r1.66.2.2
--- Common.py	9 Apr 2003 22:38:08 -0000	1.66.2.1
+++ Common.py	5 May 2003 00:43:53 -0000	1.66.2.2
@@ -968,8 +968,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