Skip to content

Commit

Permalink
- fix coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Dani Gonzalez committed Oct 25, 2017
1 parent d995da4 commit b26c952
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hug/json_module.py
@@ -1,7 +1,7 @@
import os

HUG_USE_UJSON = bool(os.environ.get('HUG_USE_UJSON', 1))
try:
try: # pragma: no cover
if HUG_USE_UJSON:
import ujson as json

Expand All @@ -15,13 +15,13 @@ def __call__(self, *args, **kwargs):
kwargs.pop('default', None)
kwargs.pop('separators', None)
kwargs.update(escape_forward_slashes=False)
try: # pragma: no cover
try:
return self._dumps(*args, **kwargs)
except Exception as exc:
raise TypeError("Type[ujson] is not Serializable", exc)

json.dumps = dumps_proxy()
else:
import json
except ImportError:
except ImportError: # pragma: no cover
import json

0 comments on commit b26c952

Please sign in to comment.