Permalink
Browse files

Sanitize imported sources (#4)

  • Loading branch information...
1 parent e87c20e commit a9bf75ff73ffbe887be9f65abf27dcafcd1c362c @mvillalba committed Sep 13, 2011
Showing with 15 additions and 15 deletions.
  1. +1 −1 src/namecheap/__init__.py
  2. +6 −6 src/namecheap/api.py
  3. +8 −8 src/namecheap/exceptions.py
@@ -24,4 +24,4 @@
##############################################################################
__version__ = 'develop'
-__all__ = []
+__all__ = ['client', 'exceptions', 'api']
View
@@ -118,21 +118,21 @@ def _call(self, command, args={}):
system = doc['Errors']['Number'][0:2]
if system == '10':
- raise NCAuthenticationException(doc)
+ raise NCAuthenticationError(doc)
elif system == '20':
- raise NCValidationException(doc)
+ raise NCValidationError(doc)
elif system == '25':
- raise NCPaymentException(doc)
+ raise NCPaymentError(doc)
elif system == '30':
- raise NCProviderException(doc)
+ raise NCProviderError(doc)
elif system == '35':
raise NCPolicyError(doc)
elif system == '40':
raise NCSystemError(doc)
elif system == '50':
- raise NCUnknownException(doc)
+ raise NCUnknownError(doc)
else:
- raise NCException(doc)
+ raise NCError(doc)
return doc
@@ -276,7 +276,7 @@
'250': 'CiraRegistrant',
}
-class NCException(Exception):
+class NCError(Exception):
def __init__(self, doc):
self.doc = doc
self.number = doc['Errors']['Number']
@@ -296,24 +296,24 @@ def __init__(self, doc):
self.param, self.text)
)
-class NCAuthenticationError(NCException):
+class NCAuthenticationError(NCError):
pass
-class NCValidationError(NCException):
+class NCValidationError(NCError):
pass
-class NCPaymentError(NCException):
+class NCPaymentError(NCError):
pass
-class NCProviderError(NCException):
+class NCProviderError(NCError):
pass
-class NCPolicyError(NCException):
+class NCPolicyError(NCError):
pass
-class NCSystemError(NCException):
+class NCSystemError(NCError):
pass
-class NCUnknownError(NCException):
+class NCUnknownError(NCError):
pass

0 comments on commit a9bf75f

Please sign in to comment.