mirror of
https://github.com/kennethreitz/env.git
synced 2026-06-05 15:00:18 +00:00
Modified map to input and output lower cased keys.
This commit is contained in:
@@ -56,13 +56,13 @@ def prefix(prefix):
|
||||
|
||||
def map(**kwargs):
|
||||
"""Returns a dictionary of the given keyword arguments mapped to their
|
||||
values from the environment.
|
||||
values from the environment, with input and output keys lower cased.
|
||||
"""
|
||||
|
||||
d = {}
|
||||
e = lower_dict(environ.copy())
|
||||
|
||||
for k, v in kwargs.iteritems():
|
||||
d[k] = e.get(v)
|
||||
d[k.lower()] = e.get(v.lower())
|
||||
|
||||
return d
|
||||
|
||||
Reference in New Issue
Block a user