From 3a0bacfcf67af870b1c8839c7d8d89ef23828142 Mon Sep 17 00:00:00 2001
From: Wainer Vandelli <Wainer.Vandelli@cern.ch>
Date: Wed, 2 Jun 2010 17:30:48 +0000
Subject: [PATCH] Make the file selection a list of Unix regular expressions

---
 Script/Conf.cfg         | 4 ++--
 Script/ManagerThread.py | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Script/Conf.cfg b/Script/Conf.cfg
index 6206eb2..73f8940 100755
--- a/Script/Conf.cfg
+++ b/Script/Conf.cfg
@@ -63,8 +63,8 @@ DirList: ['/data1',
     
 
 # Unix pathname pattern for file selection
-# FilePattern: '*[.data,.out]'
-DataFilePattern: '*.data'
+# FilePattern: '[*.data, *.out]'
+DataFilePattern: '[*.data,]'
 
 # Number of files to be deleted before to update the list of files to be copied
 nDel: 2
diff --git a/Script/ManagerThread.py b/Script/ManagerThread.py
index b585580..f47e356 100755
--- a/Script/ManagerThread.py
+++ b/Script/ManagerThread.py
@@ -243,7 +243,7 @@ class ManagerThread(threading.Thread):
             #### new .data files from current run 
             #### .data files from current run, locked when taken by CopyThread
 
-            files = glob.glob(os.path.join(folder, self.DataFilePattern))
+            files = sum([glob.glob(os.path.join(folder,p)) for p in self.DataFilePattern],[])
             self.logInfo = {'file':self.logger.findCaller()[0],'line':self.logger.findCaller()[1]}        
             self.logger.debug('%d files found on folder %s' % (len(files), folder), extra = self.logInfo)
             
-- 
GitLab