Skip to content
Snippets Groups Projects
Commit 6dfe9ae7 authored by Steven Murray's avatar Steven Murray
Browse files

cta-fst-gc now logs an error if it cannot list the contents of an FST...

cta-fst-gc now logs an error if it cannot list the contents of an FST filesystem or if determine the filesystem's sub directories
parent 10252532
No related branches found
No related tags found
No related merge requests found
......@@ -302,8 +302,21 @@ class Gc:
self.processfile(subdir, fstfile)
def processfs(self, path):
fssubdirs = [os.path.join(path, f) for f in self.disk.listdir(path)
if re.match('^[0-9A-Fa-f]{8}$', f) and self.disk.isdir(os.path.join(path, f))]
fsfiles = []
try:
fsfiles = self.disk.listdir(path)
except Exception as err:
self.log.error("Failed to list contents of filesystem: path={}: {}".format(path, err))
return
fssubdirs = []
try:
fssubdirs = [os.path.join(path, f) for f in fsfiles
if re.match('^[0-9A-Fa-f]{8}$', f) and self.disk.isdir(os.path.join(path, f))]
except Exception as err:
self.log.error("Failed to determine sub directories of filesystem: path={}: {}".format(path, err))
return
for fssubdir in fssubdirs:
self.processfssubdir(fssubdir)
......
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