[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
In directory moria.mit.edu:/tmp/cvs-serv7561/lib/mixminion

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

Index: ClientDirectory.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/ClientDirectory.py,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- ClientDirectory.py	23 Mar 2004 03:54:12 -0000	1.37
+++ ClientDirectory.py	26 Apr 2004 16:55:45 -0000	1.38
@@ -48,6 +48,1231 @@
 class GotInvalidDirectoryError(UIError):
     """Raised when we have downloaded an invalid directory."""
 
+class _DescriptorSourceSharedState:
+    """DOCDOC"""
+    MAGIC = "DSSS-0.1"
+    EXPIRY_SLOPPINESS = 7200
+    def __init__(self):
+        self.lock = RWLock()
+        self.disklock = threading.RLock()
+        self.digestMap = {}
[...1200 lines suppressed...]
+            try:
+                t = mixminion.parse_version_string(a)
+            except ValueError:
+                LOG.warn("Couldn't parse recommended version %s", a)
+                continue
+            try:
+                if mixminion.cmp_versions(current_t, t) < 0:
+                    more_recent_exists = 1
+            except ValueError:
+                pass
+        if more_recent_exists:
+            LOG.warn("This software may be obsolete; "
+                      "You should consider upgrading.")
+        else:
+            LOG.warn("This software is newer than any version "
+                     "on the recommended list.")
+
 class ClientDirectory:
     """A ClientDirectory manages a list of server descriptors, either
        imported from the command line or from a directory."""

Index: Config.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/Config.py,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -d -r1.84 -r1.85
--- Config.py	23 Mar 2004 03:03:36 -0000	1.84
+++ Config.py	26 Apr 2004 16:55:45 -0000	1.85
@@ -1052,6 +1052,10 @@
         # ...default to 2 minutes.
         return 120
 
+    def isServerConfig(self):
+        """DOCDOC"""
+        return 0
+
 def _validateHostSection(sec):
     """Helper function: Makes sure that the shared [Host] section is correct;
        raise ConfigError if it isn't"""