From fe774f17712556ed50a19b4cc9a50f60e6a9b004 Mon Sep 17 00:00:00 2001 From: Salvo 'LtWorf' Tomaselli Date: Fri, 9 Oct 2015 10:38:53 +0200 Subject: [PATCH] Improve handling of non existant files --- relational_gui.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/relational_gui.py b/relational_gui.py index dc1b726..a1a33b4 100755 --- a/relational_gui.py +++ b/relational_gui.py @@ -104,9 +104,9 @@ if __name__ == "__main__": form = guihandler.relForm() - m = enumerate(map(os.path.isfile, files)) + m = zip(files, map(os.path.isfile, files)) 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: print ("%s: not a file" % invalid, file=sys.stderr)