[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[minion-cvs] Be more paranoid about OSError
Update of /home/minion/cvsroot/src/minion/lib/mixminion
In directory moria.mit.edu:/tmp/cvs-serv8355/lib/mixminion
Modified Files:
ClientMain.py Common.py
Log Message:
Be more paranoid about OSError
Index: ClientMain.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/ClientMain.py,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -d -r1.79 -r1.80
--- ClientMain.py 28 May 2003 07:36:24 -0000 1.79
+++ ClientMain.py 28 May 2003 08:39:45 -0000 1.80
@@ -204,8 +204,9 @@
try:
os.unlink(os.path.join(self.dir, "cache"))
- except OSError:
- pass
+ except OSError, e:
+ if e.errno != errno.ENOENT:
+ raise
# Install the new directory
if gz:
Index: Common.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/Common.py,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -d -r1.82 -r1.83
--- Common.py 28 May 2003 08:08:19 -0000 1.82
+++ Common.py 28 May 2003 08:39:45 -0000 1.83
@@ -302,8 +302,8 @@
raise MixFatalError("Nonexistent directory %s" % d)
try:
os.makedirs(d, 0700)
- except OSError:
- raise MixFatalError("Unable to create directory %s" % d)
+ except OSError, e:
+ raise MixFatalError("Unable to create directory %s: %s" % d, e)
checkPrivateDir(d)