From 0776832c2ec237012699c290c3f247d15535d351 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 6 Oct 2011 01:09:18 -0400 Subject: make --reload work under py3 --- pyramid/scripts/pserve.py | 4 ++-- 1 file 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) -- cgit v1.2.3