Permalink
Browse files

more pylint crap

  • Loading branch information...
1 parent 444fdf7 commit 6c77261a0e9cda221980c9240c7fffc93a78f7f7 @adregner committed Jul 23, 2012
Showing with 7 additions and 3 deletions.
  1. +6 −2 clouddb/api/requester.py
  2. +1 −1 clouddb/models/base.py
View
@@ -16,8 +16,12 @@
from json import loads as json_loads
from json import dumps as json_dumps
except ImportError:
- from simplejson import loads as json_loads
- from simplejson import dumps as json_dumps
+ try:
+ from simplejson import loads as json_loads
+ from simplejson import dumps as json_dumps
+ except ImportError:
+ # TODO : proper error
+ raise Exception("This library requires some form of JSON support.")
from clouddb.api.auth import APIAuthenticator
from clouddb import errors
View
@@ -38,7 +38,7 @@ def _load_into_self(self, new_data, keys):
"""
try:
d = dict([ (k, new_data[k]) for k in keys ])
- except KeyError as e:
+ except KeyError:
# TODO : proper exception
raise Exception("%s must be specified when using %s objects" %
(k, self.__class__.__name__))

0 comments on commit 6c77261

Please sign in to comment.