Author: dmeyer
Date: Wed Apr 19 15:40:27 2006
New Revision: 1420

Modified:
   trunk/beacon/src/db.py

Log:
Softlink patch 1: Do not query the db if the parent is not scanned

Modified: trunk/beacon/src/db.py
==============================================================================
--- trunk/beacon/src/db.py      (original)
+++ trunk/beacon/src/db.py      Wed Apr 19 15:40:27 2006
@@ -231,11 +231,12 @@
         else:
             dirname = parent.filename[:-1]
         items = []
-        for i in self._db.query(parent = parent._beacon_id):
-            if i['type'] == 'dir':
-                items.append(create_dir(i, parent))
-            else:
-                items.append(create_file(i, parent))
+        if parent._beacon_id:
+            for i in self._db.query(parent = parent._beacon_id):
+                if i['type'] == 'dir':
+                    items.append(create_dir(i, parent))
+                else:
+                    items.append(create_file(i, parent))
         # sort items based on url. The listdir is also sorted, that makes
         # checking much faster
         items.sort(lambda x,y: cmp(x._beacon_name, y._beacon_name))


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to