Skip to content
Snippets Groups Projects
Commit 60eca78a authored by Fabrice Le Goff's avatar Fabrice Le Goff
Browse files

ExcludeFileRegex fixes after test

parent e553ea26
No related branches found
Tags CastorScript-01-08-10
No related merge requests found
Pipeline #623001 passed
......@@ -197,7 +197,7 @@ class Conf:
self.DataFilePattern = cfg.DataFilePattern
try:
self.ExcludeFileRegex = cfg.DataFilePattern
self.ExcludeFileRegex = cfg.ExcludeFileRegex
except AttributeError:
self.ExcludeFileRegex = None
......
......@@ -13,6 +13,7 @@ import pprint
import math
import Constants
import errno
import re
from utils import set_log_level,formatter,thread_id_string
from itertools import chain
......@@ -201,7 +202,7 @@ class ManagerThread(threading.Thread):
if not filename in self.CopyFileList:
self.logger.debug('New file: %s', filename)
if self.conf.ExcludeFileRegex and re.match(self.conf.ExcludeFileRegex, filename):
if self.conf.ExcludeFileRegex is not None and re.match(self.conf.ExcludeFileRegex, filename):
self.logger.debug('ignoring file matching exclude regex: %s', filename)
continue
......
......@@ -103,9 +103,11 @@ DirList: ['/tmp/atlascdr/']
# Unix pathname pattern for file selection
# FilePattern: ['*.data', '*.out']
DataFilePattern: ['*.data',]
# Regex file exclusion (after selection)
ExcludeFileRegex: None
# Number of files to be deleted before to update the list of files to be copied
nDel: 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment