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

[minion-cvs] Bug37} Catch UIError when downloading directories in se...



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

Modified Files:
	ServerConfig.py ServerMain.py 
Log Message:
{Bug37} Catch UIError when downloading directories in server.

Index: ServerConfig.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/ServerConfig.py,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- ServerConfig.py	23 Mar 2004 00:09:24 -0000	1.54
+++ ServerConfig.py	26 Apr 2004 16:55:46 -0000	1.55
@@ -237,6 +237,9 @@
             return os.path.join(self.getWorkDir(), 'queues')
         else:
             return self._get_fname("Server", "QueueDir", "work/queues")
+    def isServerConfig(self):
+        """DOCDOC"""
+        return 1
 
 def _validateRetrySchedule(mixInterval, schedule, sectionName):
     """Backend for ServerConfig.validateRetrySchedule -- separated for testing.

Index: ServerMain.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/ServerMain.py,v
retrieving revision 1.124
retrieving revision 1.125
diff -u -d -r1.124 -r1.125
--- ServerMain.py	23 Mar 2004 05:15:17 -0000	1.124
+++ ServerMain.py	26 Apr 2004 16:55:46 -0000	1.125
@@ -727,6 +727,9 @@
             os.path.join(config.getWorkDir(),"dir"))
         try:
             self.dirClient.updateDirectory()
+        except UIError, e:
+            LOG.warn(str(e))
+            LOG.warn("   (I'll use the old directory until I have a new one.)")
         except mixminion.ClientDirectory.GotInvalidDirectoryError, e:
             LOG.warn(str(e))
             LOG.warn("   (I'll use the old one until I get one that's good.)")
@@ -843,6 +846,11 @@
                 LOG.warn("    I'll try again in an hour.")
                 nextUpdate = min(succeedingMidnight(time.time()+30),
                                  time.time()+3600)
+            except UIError, e:#XXXX008 This should really be a new exception
+                LOG.warn(str(e))
+                LOG.warn("    I'll try again in an hour.")
+                nextUpdate = min(succeedingMidnight(time.time()+30),
+                                 time.time()+3600)
             self.scheduleOnce(nextUpdate, "UPDATE_DIR_CLIENT",
                               self.updateDirectoryClient)
         self.processingThread.addJob(c)