diff options
-rw-r--r-- | lorrycontroller/lstroves.py | 5 | ||||
-rw-r--r-- | lorrycontroller/readconf.py | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/lorrycontroller/lstroves.py b/lorrycontroller/lstroves.py index e4fbbd4..72515f5 100644 --- a/lorrycontroller/lstroves.py +++ b/lorrycontroller/lstroves.py @@ -85,9 +85,8 @@ class TroveRepositoryLister(object): ignored_patterns = json.loads(trovehost['ignore']) ignored_paths = set() - if ignored_patterns: - for pattern in ignored_patterns: - ignored_paths.update(fnmatch.filter(repo_paths, pattern)) + for pattern in ignored_patterns: + ignored_paths.update(fnmatch.filter(repo_paths, pattern)) return set(repo_paths).difference(ignored_paths) diff --git a/lorrycontroller/readconf.py b/lorrycontroller/readconf.py index 4bcbce4..a108c41 100644 --- a/lorrycontroller/readconf.py +++ b/lorrycontroller/readconf.py @@ -296,7 +296,7 @@ class ReadConfiguration(lorrycontroller.LorryControllerRoute): 'lorry-timeout', self.DEFAULT_LORRY_TIMEOUT), ls_interval=section['ls-interval'], prefixmap=json.dumps(section['prefixmap']), - ignore=json.dumps(section.get('ignore'))) + ignore=json.dumps(section.get('ignore', []))) class ValidationError(Exception): |