error handling changes as suggested by ekim

pull/120/head
Christopher Usher 5 years ago
parent 34e8d0a64b
commit 28ef77b5a7

@ -193,7 +193,7 @@ class CoverageChecker(object):
except OSError as e: except OSError as e:
if e.errno == errno.ENOENT: if e.errno == errno.ENOENT:
self.logger.warning('{} does not exist'.format(path)) self.logger.warning('{} does not exist'.format(path))
break continue
hours.sort() hours.sort()
previous_hour_segments = None previous_hour_segments = None
@ -211,8 +211,8 @@ class CoverageChecker(object):
segment_names = [name for name in os.listdir(hour_path) if not name.startswith('.')] segment_names = [name for name in os.listdir(hour_path) if not name.startswith('.')]
except OSError as e: except OSError as e:
if e.errno == errno.ENOENT: if e.errno == errno.ENOENT:
self.logger.warning('{} does not exist'.format(hour_path)) self.logger.warning('Hour {} was deleted between finding it and processing it, ignoring'.format(hour))
break continue
segment_names.sort() segment_names.sort()
parsed = [] parsed = []
bad_segment_count = 0 bad_segment_count = 0

Loading…
Cancel
Save