logo       
Google Custom Search
    AddThis Social Bookmark Button

web/hosts/issues/detectors __init__.py,1.2,1.3: msg#00007

Subject: web/hosts/issues/detectors __init__.py,1.2,1.3
Update of /cvs/fresco/web/hosts/issues/detectors
In directory purcel:/tmp/cvs-serv20955

Modified Files:
        __init__.py 
Log Message:
Fix detectors/__init__.py so it only inits each detector module once


Index: __init__.py
===================================================================
RCS file: /cvs/fresco/web/hosts/issues/detectors/__init__.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- __init__.py 14 Jan 2003 03:38:35 -0000      1.2
+++ __init__.py 2 Jun 2003 09:52:08 -0000       1.3
@@ -5,12 +5,14 @@
     this_dir = os.path.split(__file__)[0]
     try:
         sys.path.insert(0, this_dir)
+        imported = []
         for file in os.listdir(this_dir):
             file, ext = os.path.splitext(file)
             if file == '__init__': continue
-            if ext in ('.py', '.pyc'):
+            if ext in ('.py', '.pyc') and file not in imported:
                 module = __import__(file)
                 module.init(db)
+                imported.append(file)
     finally:
         del sys.path[0]



Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>