Deal with failures to open input file (fixes #50)
This commit is contained in:
parent
bbff3b44f6
commit
7390514877
@ -284,8 +284,12 @@ def main():
|
|||||||
with sys.stdin as flist:
|
with sys.stdin as flist:
|
||||||
f = flist.read().splitlines()
|
f = flist.read().splitlines()
|
||||||
else:
|
else:
|
||||||
|
try:
|
||||||
with open(inputfilename, 'rt') as flist:
|
with open(inputfilename, 'rt') as flist:
|
||||||
f = flist.read().splitlines()
|
f = flist.read().splitlines()
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
sys.exit(1)
|
||||||
else:
|
else:
|
||||||
f = resolvers
|
f = resolvers
|
||||||
if len(f) == 0:
|
if len(f) == 0:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user