summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2011-10-06 01:09:18 -0400
committerChris McDonough <chrism@plope.com>2011-10-06 01:09:18 -0400
commit0776832c2ec237012699c290c3f247d15535d351 (patch)
tree8c79cdd26886f4b332992005b348a2aea25dcf1a
parent2e6d63ce873dd866f93215310c633a6d75dc0e13 (diff)
downloadpyramid-0776832c2ec237012699c290c3f247d15535d351.tar.gz
pyramid-0776832c2ec237012699c290c3f247d15535d351.tar.bz2
pyramid-0776832c2ec237012699c290c3f247d15535d351.zip
make --reload work under py3
-rw-r--r--pyramid/scripts/pserve.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pyramid/scripts/pserve.py b/pyramid/scripts/pserve.py
index b9d2d944f..01fb6837b 100644
--- a/pyramid/scripts/pserve.py
+++ b/pyramid/scripts/pserve.py
@@ -737,7 +737,7 @@ class _methodwrapper(object):
self.type = type
def __call__(self, *args, **kw):
- assert not kw.has_key('self') and not kw.has_key('cls'), (
+ assert not 'self' in kw and not 'cls' in kw, (
"You cannot use 'self' or 'cls' arguments to a "
"classinstancemethod")
return self.func(*((self.obj, self.type) + args), **kw)
@@ -841,7 +841,7 @@ class Monitor(object):
continue
if filename.endswith('.pyc') and os.path.exists(filename[:-1]):
mtime = max(os.stat(filename[:-1]).st_mtime, mtime)
- if not self.module_mtimes.has_key(filename):
+ if not filename in self.module_mtimes:
self.module_mtimes[filename] = mtime
elif self.module_mtimes[filename] < mtime:
print("%s changed; reloading..." % filename)