mirror of
https://github.com/kennethreitz/env.git
synced 2026-06-05 23:10:16 +00:00
Fix urlparse import under Python 3
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from os import environ
|
||||
from urlparse import urlparse as _urlparse
|
||||
|
||||
try:
|
||||
from urllib.parse import urlparse as _urlparse
|
||||
except ImportError:
|
||||
from urlparse import urlparse as _urlparse
|
||||
|
||||
def lower_dict(d):
|
||||
"""Lower cases string keys in given dict."""
|
||||
|
||||
Reference in New Issue
Block a user