diff options
author | David Cramer <dcramer@gmail.com> | 2015-10-19 15:37:38 -0700 |
---|---|---|
committer | David Cramer <dcramer@gmail.com> | 2015-10-19 15:37:57 -0700 |
commit | 5a16f7f012eed90c6cbd463daf288d8645bab51e (patch) | |
tree | 3784e3310f939c10203c296046ac3cd0fbbe536b | |
parent | 9ef72b2cfb76b5082416742e9438e072d948b245 (diff) | |
download | raven-5a16f7f012eed90c6cbd463daf288d8645bab51e.tar.gz |
Convert input DSN values to strings (fixes GH-653)
-rw-r--r-- | CHANGES | 1 | ||||
-rw-r--r-- | raven/conf/remote.py | 2 |
2 files changed, 3 insertions, 0 deletions
@@ -5,6 +5,7 @@ Version 5.8.0 * pkg_resources is now prioritized for default version detection. * Updated `in_app` support to include exception frames. * Fixed support for `SENTRY_USER_ATTRS` in Flask. +* Handle DSNs which are sent as unicode values in Python 2. Version 5.7.2 ------------- diff --git a/raven/conf/remote.py b/raven/conf/remote.py index bcba491..a109e21 100644 --- a/raven/conf/remote.py +++ b/raven/conf/remote.py @@ -5,6 +5,7 @@ import warnings from raven.exceptions import InvalidDsn from raven.transport.threaded import ThreadedHTTPTransport from raven.utils import six +from raven.utils.encoding import to_string from raven.utils.urlparse import parse_qsl, urlparse ERR_UNKNOWN_SCHEME = 'Unsupported Sentry DSN scheme: {0} ({1})' @@ -55,6 +56,7 @@ class RemoteConfig(object): @classmethod def from_string(cls, value, transport=None, transport_registry=None): + value = to_string(value) url = urlparse(value) if url.scheme not in ('http', 'https'): |