Commits

benoitc  committed 7fa8471

fix exception warning

  • Participants
  • Parent commits 8d847f1

Comments (0)

Files changed (2)

 store/*
 *.DS_Store
 *.beam
-py_restclient.egg-info
-dist
+*.log
 
 syntax: regexp
 .*\#.*\#$

File restclient/errors.py

 class ResourceError(Exception):
 
     def __init__(self, msg=None, http_code=None, response=None):
-        self.message = msg or ''
+        self.msg = msg or ''
         self.status_code = http_code
         self.response = response
         Exception.__init__(self)
-
+        
+    def _get_message(self):
+        return self.msg
+    def _set_message(self, msg):
+        self.msg = msg or ''
+    message = property(_get_message, _set_message)    
+    
     def __str__(self):
-        if self.message:
-            return self.message
+        if self.msg:
+            return self.msg
         try:
             return self._fmt % self.__dict__
         except (NameError, ValueError, KeyError), e: