src/modules/misc.py
changeset 835 34ec4401dc48
parent 814 76909c2cad8f
child 838 aafbe4737188
--- a/src/modules/misc.py	Fri Jan 23 16:04:18 2009 -0600
+++ b/src/modules/misc.py	Mon Jan 26 13:25:16 2009 -0800
@@ -484,6 +484,11 @@
                 res.sort(cmp=__fmri_cmp)
         return res
 
+class CfgCacheError(Exception):
+        """Thrown when there are errors with the cfg cache."""
+        def __init__(self, args=None):
+                self.args = args
+
 class TransportException(Exception):
         """ Abstract base class for various transport exceptions """
         def __init__(self):
@@ -524,6 +529,9 @@
                         s += "\n"
                 return s
 
+        def __len__(self):
+                return len(self.exceptions)
+
 class TransferIOException(TransportException):
         """Raised for retryable IO errors on underlying transport.
         Protocol errors are TransferContentExceptions, timeouts
@@ -656,7 +664,6 @@
                         return r
                 return cmp(self.data, other.data)
 
-
 # Default maximum memory useage during indexing
 # This is a soft cap since memory usage is estimated.
 try: