summaryrefslogtreecommitdiff
path: root/paste/httpheaders.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-03-18 17:24:55 +0100
committerVictor Stinner <victor.stinner@gmail.com>2014-03-18 17:24:55 +0100
commitc7b6adc38c1cc78498e695406fdb359048f731d5 (patch)
treebaf3149076b6511ab0069138ab800ebf213e8b12 /paste/httpheaders.py
parentc869864780439cdc52618b31ca3b76b4af6eadee (diff)
downloadpaste-c7b6adc38c1cc78498e695406fdb359048f731d5.tar.gz
Copy the dictionary of global variables to be able to iterate over it and
modify global variables
Diffstat (limited to 'paste/httpheaders.py')
-rw-r--r--paste/httpheaders.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/paste/httpheaders.py b/paste/httpheaders.py
index 7c57c29..702e596 100644
--- a/paste/httpheaders.py
+++ b/paste/httpheaders.py
@@ -136,6 +136,7 @@ dashes to give CamelCase style names.
"""
import mimetypes
import re
+import six
from time import time as now
try:
# Python 3
@@ -171,7 +172,7 @@ REQUEST_METHOD = EnvironVariable("REQUEST_METHOD")
SCRIPT_NAME = EnvironVariable("SCRIPT_NAME")
PATH_INFO = EnvironVariable("PATH_INFO")
-for _name, _obj in six.iteritems(globals()):
+for _name, _obj in six.iteritems(dict(globals())):
if isinstance(_obj, EnvironVariable):
__all__.append(_name)
@@ -1099,6 +1100,6 @@ for head in _headers.values():
__all__.append(headname)
__pudge_all__ = __all__[:]
-for _name, _obj in six.iteritems(globals()):
+for _name, _obj in six.iteritems(dict(globals())):
if isinstance(_obj, type) and issubclass(_obj, HTTPHeader):
__pudge_all__.append(_name)