Improve handling of non existant files
This commit is contained in:
parent
e089e48a37
commit
fe774f1771
@ -104,9 +104,9 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
form = guihandler.relForm()
|
form = guihandler.relForm()
|
||||||
|
|
||||||
m = enumerate(map(os.path.isfile, files))
|
m = zip(files, map(os.path.isfile, files))
|
||||||
invalid = ' '.join(
|
invalid = ' '.join(
|
||||||
(files[i[0]] for i in (filter(lambda x: not x[1], m)))
|
(i[0] for i in (filter(lambda x: not x[1], m)))
|
||||||
)
|
)
|
||||||
if invalid:
|
if invalid:
|
||||||
print ("%s: not a file" % invalid, file=sys.stderr)
|
print ("%s: not a file" % invalid, file=sys.stderr)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user