Commits

Brad Montgomery committed 79a3748

raising URLError appropriately now, and fixed a typo

  • Participants
  • Parent commits 114c6ea

Comments (0)

Files changed (1)

File bitbucket/api.py

         try:
             return json.loads(self.load_url(url))
         except ValueError:
-            raise urllib2.URLError
+            raise URLError, "Could not parse JSON result from %s" % url
 
     def build_request(self, url, data=None):
         if not all((self.username, self.password)):
 
     def get(self):
         url = api_base + 'users/%s/' % self.username
-        return self.bb._loads(url))
+        return self.bb._loads(url)
 
     def __repr__(self):
         return '<User: %s>' % self.username