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

[minion-cvs] Avoid nasty infinite loop on openUnique when directory ...



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

Modified Files:
	Common.py 
Log Message:
Avoid nasty infinite loop on openUnique when directory is unwritable

Index: Common.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/Common.py,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -d -r1.81 -r1.82
--- Common.py	28 May 2003 07:36:24 -0000	1.81
+++ Common.py	28 May 2003 08:08:19 -0000	1.82
@@ -1205,8 +1205,9 @@
         try:
             fd = os.open(fname, os.O_WRONLY|os.O_CREAT|os.O_EXCL, perms)
             return os.fdopen(fd, mode), fname
-        except OSError:
-            pass
+        except OSError, e:
+            if e.errno != errno.EEXIST:
+                raise
         idx += 1
         fname = os.path.join(base, "%s.%s"%(rest,idx))