summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpjenvey <devnull@localhost>2008-06-17 00:40:16 +0000
committerpjenvey <devnull@localhost>2008-06-17 00:40:16 +0000
commitf69a4351cd2378f7652dd8a40ed1275a866de5a8 (patch)
tree6ab9089c91ff222c9711c4f6ef6ffe32af2d9138
parent64c71880dd6a50fcf88db69b3336cf1571b1136f (diff)
downloadpaste-f69a4351cd2378f7652dd8a40ed1275a866de5a8.tar.gz
handle .class as well as .pyc
-rw-r--r--paste/reloader.py3
-rw-r--r--paste/util/finddata.py2
2 files changed, 4 insertions, 1 deletions
diff --git a/paste/reloader.py b/paste/reloader.py
index bd3f744..6b621a5 100644
--- a/paste/reloader.py
+++ b/paste/reloader.py
@@ -96,6 +96,9 @@ class Monitor(object):
continue
if filename.endswith('.pyc') and os.path.exists(filename[:-1]):
mtime = max(os.stat(filename[:-1]).st_mtime, mtime)
+ elif filename.endswith('$py.class') and \
+ os.path.exists(filename[:-9] + '.py'):
+ mtime = max(os.stat(filename[:-9] + '.py').st_mtime, mtime)
if not self.module_mtimes.has_key(filename):
self.module_mtimes[filename] = mtime
elif self.module_mtimes[filename] < mtime:
diff --git a/paste/util/finddata.py b/paste/util/finddata.py
index a717bf3..af29c04 100644
--- a/paste/util/finddata.py
+++ b/paste/util/finddata.py
@@ -11,7 +11,7 @@ from distutils.util import convert_path
# Provided as an attribute, so you can append to these instead
# of replicating them:
-standard_exclude = ('*.py', '*.pyc', '*~', '.*', '*.bak')
+standard_exclude = ('*.py', '*.pyc', '*$py.class', '*~', '.*', '*.bak')
standard_exclude_directories = ('.*', 'CVS', '_darcs', './build',
'./dist', 'EGG-INFO', '*.egg-info')