summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3a6f0fe)
raw | patch | inline | side by side (parent: 3a6f0fe)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Thu, 4 Sep 2003 23:44:56 +0000 (23:44 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Thu, 4 Sep 2003 23:44:56 +0000 (23:44 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1853 57a73879-2fb5-44c3-a270-3262357dd7e2
CHANGES.txt | patch | blob | history | |
templates/classic/detectors/__init__.py | patch | blob | history | |
templates/minimal/detectors/__init__.py | patch | blob | history |
diff --git a/CHANGES.txt b/CHANGES.txt
index 39f9a8086b4e4f8042d45ce1b9e96796e9b1d2db..f31aa91ce57cb1a16fdc3c02dfc8722201893829 100644 (file)
--- a/CHANGES.txt
+++ b/CHANGES.txt
Fixed:
- cleaned up, clarified internal caching API in *dbm backends
- stopped pyc writing to current directory! yay! (patch 800718 with changes)
+- fixed file leak in detector initialisation (patch 800715)
- commented out example tracker homes (patch 800720)
index a9460a0dc667a6a54280248e78c38782ce0092fa..518d3437e6fac313b734ca2baef7c36c72c08d56 100644 (file)
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-#$Id: __init__.py,v 1.2 2003-09-04 23:39:18 richard Exp $
+#$Id: __init__.py,v 1.3 2003-09-04 23:44:56 richard Exp $
import sys, os, imp
''' execute the init functions of all the modules in this directory
'''
this_dir = os.path.split(__file__)[0]
- for file in os.listdir(this_dir):
- path = os.path.join(this_dir, file)
- name, ext = os.path.splitext(file)
+ for filename in os.listdir(this_dir):
+ name, ext = os.path.splitext(filename)
if name == '__init__':
continue
if ext == '.py':
- module = imp.load_module(name, open(path), os.path.abspath(path),
- ('.py', 'r', imp.PY_SOURCE))
+ path = os.path.abspath(os.path.join(this_dir, filename))
+ fp = open(path)
+ try:
+ module = imp.load_module(name, open(path), path,
+ ('.py', 'r', imp.PY_SOURCE))
+ finally:
+ fp.close()
module.init(db)
# vim: set filetype=python ts=4 sw=4 et si
index 859a22cc0c3979e2f96309a3ab9fcd1fe8a62f22..518d3437e6fac313b734ca2baef7c36c72c08d56 100644 (file)
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-#$Id: __init__.py,v 1.2 2003-09-04 23:39:18 richard Exp $
+#$Id: __init__.py,v 1.3 2003-09-04 23:44:56 richard Exp $
import sys, os, imp
''' execute the init functions of all the modules in this directory
'''
this_dir = os.path.split(__file__)[0]
- for file in os.listdir(this_dir):
- path = os.path.join(this_dir, file)
- name, ext = os.path.splitext(file)
+ for filename in os.listdir(this_dir):
+ name, ext = os.path.splitext(filename)
if name == '__init__':
continue
if ext == '.py':
- module = imp.load_module(name, open(path), os.path.abspath(path),
- ('.py', 'r', imp.PY_SOURCE))
- print (name, open(path), file, module)
+ path = os.path.abspath(os.path.join(this_dir, filename))
+ fp = open(path)
+ try:
+ module = imp.load_module(name, open(path), path,
+ ('.py', 'r', imp.PY_SOURCE))
+ finally:
+ fp.close()
module.init(db)
# vim: set filetype=python ts=4 sw=4 et si