From 4aa74f5ad8c8076b4137ee9f9bcb43f857e92251 Mon Sep 17 00:00:00 2001 From: Joey Payne Date: Tue, 13 Dec 2016 17:36:08 -0700 Subject: [PATCH] Fix #175: Nw versions not updating if version file is empty --- command_line.py | 2 +- main.py | 12 ------------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/command_line.py b/command_line.py index 2bbf137..0e75f43 100644 --- a/command_line.py +++ b/command_line.py @@ -89,7 +89,7 @@ def setup_nw_versions(self): for line in f: nw_version.values.append(line.strip()) except IOError: - nw_version.values.append(nw_version.default_value) + pass def get_nw_versions(self): """Get the already downloaded nw versions from the settings""" diff --git a/main.py b/main.py index 47c32e4..eb2eb94 100644 --- a/main.py +++ b/main.py @@ -210,18 +210,6 @@ def open_recent_file(self): if action: self.load_project(action.data()) - def setup_nw_versions(self): - """Loads stored versions that were previously retrieved.""" - nw_version = self.get_setting('nw_version') - try: - f = codecs.open(utils.get_data_file_path(config.VER_FILE), - encoding='utf-8') - for line in f: - nw_version.values.append(line.strip()) - f.close() - except IOError: - nw_version.values.append(nw_version.default_value) - def create_application_layout(self): """Create all widgets and set the central widget.""" self.main_layout = QtGui.QVBoxLayout()