From 3c9f5537ea155fa81ffaa421dabffbd10abd690e Mon Sep 17 00:00:00 2001 From: eblade Date: Wed, 25 Feb 2009 12:40:39 -0500 Subject: [PATCH] import should stop erroring out and crashing if a file it wanted to read has been deleted --- pyfpdb/fpdb_import.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyfpdb/fpdb_import.py b/pyfpdb/fpdb_import.py index aeb1e027..ca9167e8 100644 --- a/pyfpdb/fpdb_import.py +++ b/pyfpdb/fpdb_import.py @@ -235,8 +235,9 @@ class Importer: if (file=="stdin"): inputFile=sys.stdin else: - inputFile=open(file, "rU") - try: loc = self.pos_in_file[file] + try: + inputFile=open(file, "rU") + loc = self.pos_in_file[file] except: pass # Read input file into class and close file