proper fault string to user whose account is disabled, but attempts to extract user...
[sfa.git] / sfa / util / faults.py
index ca375a1..c833153 100644 (file)
@@ -80,7 +80,7 @@ class TreeException(SfaFault):
     def __str__(self):
         return repr(self.value)
 
-class NonexistingRecord(SfaFault):
+class NonExistingRecord(SfaFault):
     def __init__(self, value, extra = None):
         self.value = value
         faultString = "Non exsiting record %(value)s, " % locals()
@@ -255,3 +255,18 @@ class MissingSfaInfo(SfaFault):
     def __str__(self):
         return repr(self.value)
 
+class InvalidRSpec(SfaFault):
+    def __init__(self, value, extra = None):
+        self.value = value
+        faultString = "Invalid RSpec: %(value)s" % locals()
+        SfaFault.__init__(self, 108, faultString, extra)
+    def __str__(self):
+        return repr(self.value)
+
+class AccountNotEnabled(SfaFault):
+    def __init__(self,  extra = None):
+        faultString = "Account Disabled"
+        SfaFault.__init__(self, 108, faultString, extra)
+    def __str__(self):
+        return repr(self.value)
+