Simple try / except handler in the event that an edge case occurs
and a patchset is not present.
Change-Id: Ica5df2f5b37fff98c52f79bd2a8e47ba46890e80
Signed-off-by: lhinds <lhinds@redhat.com>
licence_ignore = lists.licence_ignore()
# Open patch set to get file list
- fo = open(patchset, 'r')
- lines = fo.readlines()
+ try:
+ fo = open(patchset, 'r')
+ lines = fo.readlines()
+ except IOError:
+ logger.error('%s does not exist', patchset)
+ sys.exit(1)
for line in lines:
patch_file = line.strip('\n')