Skip to content

Commit

Permalink
Use six to prevent compat issues
Browse files Browse the repository at this point in the history
  • Loading branch information
SenadI committed Sep 29, 2017
1 parent 9b6c3a2 commit 1cdacf6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sevenbridges/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import time

import requests
import six

from sevenbridges.errors import (
BadRequest, Unauthorized, Forbidden, NotFound, MethodNotAllowed,
Expand Down Expand Up @@ -132,8 +133,8 @@ def wrapper(*args, **kwargs):
e.more_info = data['more_info']
raise e
except requests.RequestException as e:
raise SbgError(message=str(e))
raise SbgError(message=six.text_type(e))
except ValueError as e:
raise SbgError(message=str(e))
raise SbgError(message=six.text_type(e))

return wrapper

0 comments on commit 1cdacf6

Please sign in to comment.