non-existent input file fault tolerance
This commit is contained in:
parent
6dc9d1bb04
commit
1f90615de3
11
plug
11
plug
@ -100,10 +100,13 @@ def plug(argv):
|
||||
i = i + 1
|
||||
if argv[i-1] == '-u':
|
||||
for sf in sfiles:
|
||||
with open(sf, 'r') as f:
|
||||
s = ungen(f.read(), get_param(argv, i, '-u'))
|
||||
with open(sf, 'w') as f:
|
||||
f.write(s)
|
||||
try:
|
||||
with open(sf, 'r') as f:
|
||||
s = ungen(f.read(), get_param(argv, i, '-u'))
|
||||
with open(sf, 'w') as f:
|
||||
f.write(s)
|
||||
except:
|
||||
print("I/O error encountered while interacting with '{0}'.".format(sf))
|
||||
continue
|
||||
|
||||
if argv[i-1] == '-g':
|
||||
|
Loading…
x
Reference in New Issue
Block a user