from __future__ import absolute_import
from raven.utils.compat import PY2
def import_string(key):
# HACK(dcramer): Ensure a unicode key is still importable
if PY2:
key = str(key)
if '.' not in key:
return __import__(key)
module_name, class_name = key.rsplit('.', 1)
module = __import__(module_name, {}, {}, [class_name], 0)
return getattr(module, class_name)
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| __pycache__ | Folder | 0755 |
|
|
| serializer | Folder | 0755 |
|
|
| __init__.py | File | 4.71 KB | 0644 |
|
| compat.py | File | 5.54 KB | 0644 |
|
| conf.py | File | 2.22 KB | 0644 |
|
| encoding.py | File | 3.23 KB | 0644 |
|
| http.py | File | 1.95 KB | 0644 |
|
| imports.py | File | 404 B | 0644 |
|
| json.py | File | 2.54 KB | 0644 |
|
| ssl_match_hostname.py | File | 3.51 KB | 0644 |
|
| stacks.py | File | 9.81 KB | 0644 |
|
| testutils.py | File | 697 B | 0644 |
|
| transaction.py | File | 1.06 KB | 0644 |
|
| urlparse.py | File | 476 B | 0644 |
|
| wsgi.py | File | 3.64 KB | 0644 |
|