Index: /main/waeup.kofa/trunk/src/waeup/kofa/datacenter.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/datacenter.py	(revision 8724)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/datacenter.py	(revision 8725)
@@ -224,5 +224,6 @@
         for name in os.listdir(os.path.join(self.storage, 'logs')):
             if RE_LOGFILE_BACKUP_NAME.match(name):
-                files.append(name)
+                if name.rsplit('.', 1)[0] == basename:
+                    files.append(name)
         return sorted(files, key=numerical_suffix, reverse=True)
 
Index: /main/waeup.kofa/trunk/src/waeup/kofa/tests/test_datacenter.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/tests/test_datacenter.py	(revision 8724)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/tests/test_datacenter.py	(revision 8725)
@@ -12,5 +12,4 @@
 from waeup.kofa.interfaces import IDataCenter, IDataCenterConfig
 
-
 class DataCenterLogQueryTests(unittest.TestCase):
     # Tests for querying logfiles via datacenter.
@@ -37,4 +36,5 @@
         path = self.logpath
         for m in range(num-1,-1,-1):
+            # write messages in order: lowest message in oldest file
             fp = open(path, 'wb')
             for n in range(50*m, 50*m+50):
@@ -42,5 +42,5 @@
                 fp.write('Other Line %d\n' % (n + 1))
             fp.close()
-            path = self.logpath + '.%d' % (m + 1)
+            path = self.logpath + '.%d' % m
         return
 
@@ -75,6 +75,7 @@
         open(self.logpath, 'wb').write('Msg 1\n')
         open(self.logpath + '-not-a-real-log', 'wb').write('Msg 2\n')
+        open(self.logpath + '-not-a-real-log.1', 'wb').write('Msg 3\n')
         result = list(datacenter.queryLogfiles('myapp.log', 'Msg'))
-        # Msg 2 won't show up in results.
+        # Msg 2 and 3 won't show up in results.
         self.assertEqual(result, ['Msg 1\n'])
         return
@@ -226,4 +227,5 @@
         # The source is deleted afterwards
         self.assertEqual(os.path.exists(csv_file2), False)
+        return
 
     def test_append_csv_file_no_dest(self):
@@ -240,4 +242,5 @@
         # The source is deleted afterwards
         self.assertEqual(os.path.exists(csv_file2), False)
+        return
 
     def test_append_csv_file_no_source(self):
@@ -252,4 +255,5 @@
         # csv_file1 is the same as before
         self.assertEqual(result, 'name,age\nManfred,28\n')
+        return
 
     def test_append_csv_file_same_src_and_dest(self):
@@ -265,2 +269,3 @@
         self.assertEqual(result, 'name,age\nManfred,28\n')
         self.assertEqual(os.path.exists(csv_file2), True)
+        return
