Modified map to input and output lower cased keys.

This commit is contained in:
Steven Honson
2012-08-02 20:27:31 +10:00
parent b5f7350870
commit a5e21cbe8f
+2 -2
View File
@@ -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