From 65411234a0b6e57fea47dd7fb8e220a70f4a02f3 Mon Sep 17 00:00:00 2001 From: LtWorf Date: Mon, 21 Jun 2010 12:33:43 +0000 Subject: [PATCH] - Checks if the given files are really files git-svn-id: http://galileo.dmi.unict.it/svn/relational/trunk@226 014f5005-505e-4b48-8d0a-63407b615a7c --- relational_gui.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/relational_gui.py b/relational_gui.py index 85e6478..e38a976 100755 --- a/relational_gui.py +++ b/relational_gui.py @@ -21,6 +21,7 @@ import sys import os +import os.path import getopt from relational import relation, parser version="0.11" @@ -74,7 +75,6 @@ if __name__ == "__main__": elif i[0]=='-c': x11=False - if x11: import sip from PyQt4 import QtCore, QtGui @@ -91,6 +91,9 @@ if __name__ == "__main__": ui.setupUi(Form) for i in range(len(files)): + if not os.path.isfile(files[i]): + print >> sys.stderr, "%s is not a file" % files[i] + printhelp(12) f=files[i].split('/') defname=f[len(f)-1].lower() if (defname.endswith(".csv") or defname.endswith(".tlb")): #removes the extension