summaryrefslogtreecommitdiff
path: root/urwid/web_display.py
diff options
context:
space:
mode:
authorEevee (Alex Munroe) <eevee.git@veekun.com>2014-05-11 19:54:35 -0700
committerEevee (Alex Munroe) <eevee.git@veekun.com>2014-05-11 21:30:23 -0700
commitbe714a183206490aafec0e244b166ba3de803142 (patch)
tree1986bc42504e299e1cb472ffe608a7e34c83de99 /urwid/web_display.py
parentef05b48a1cd4d0071873022d1a31d2a076911eb0 (diff)
downloadurwid-be714a183206490aafec0e244b166ba3de803142.tar.gz
Fix some Python 3 things that work fine in 2.6 anyway.
Diffstat (limited to 'urwid/web_display.py')
-rwxr-xr-xurwid/web_display.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/urwid/web_display.py b/urwid/web_display.py
index e088476..eccbad8 100755
--- a/urwid/web_display.py
+++ b/urwid/web_display.py
@@ -593,7 +593,7 @@ class Screen:
continue
assert len(item) == 2, "Invalid register_palette usage"
name, like_name = item
- if not self.palette.has_key(like_name):
+ if like_name not in self.palette:
raise Exception("palette entry '%s' doesn't exist"%like_name)
self.palette[name] = self.palette[like_name]
@@ -946,7 +946,7 @@ def is_web_request():
"""
Return True if this is a CGI web request.
"""
- return os.environ.has_key('REQUEST_METHOD')
+ return 'REQUEST_METHOD' in os.environ
def handle_short_request():
"""
@@ -973,7 +973,7 @@ def handle_short_request():
# Don't know what to do with head requests etc.
return False
- if not os.environ.has_key('HTTP_X_URWID_ID'):
+ if 'HTTP_X_URWID_ID' not in os.environ:
# If no urwid id, then the application should be started.
return False