From a84ace0eca55e4fd335d5a810b7715863b177725 Mon Sep 17 00:00:00 2001 From: Joey Payne Date: Mon, 31 Mar 2014 21:50:18 -0600 Subject: [PATCH] Added a check to see if a file exists. --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 39b53f1..ab7fb24 100644 --- a/main.py +++ b/main.py @@ -826,8 +826,8 @@ class MainWindow(QtGui.QWidget): os.chmod(dest_binary_path, sevenfivefive) self.progress_label.setText(self.progress_label.text()+'.') - - os.remove(nw_path) + if os.path.exists(nw_path): + os.remove(nw_path) except Exception as e: self.output_err += ''.join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])) finally: