Skip to content

Commit 4aa74f5

Browse files
committed
Fix #175: Nw versions not updating if version file is empty
1 parent 3452995 commit 4aa74f5

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

command_line.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def setup_nw_versions(self):
8989
for line in f:
9090
nw_version.values.append(line.strip())
9191
except IOError:
92-
nw_version.values.append(nw_version.default_value)
92+
pass
9393

9494
def get_nw_versions(self):
9595
"""Get the already downloaded nw versions from the settings"""

main.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -210,18 +210,6 @@ def open_recent_file(self):
210210
if action:
211211
self.load_project(action.data())
212212

213-
def setup_nw_versions(self):
214-
"""Loads stored versions that were previously retrieved."""
215-
nw_version = self.get_setting('nw_version')
216-
try:
217-
f = codecs.open(utils.get_data_file_path(config.VER_FILE),
218-
encoding='utf-8')
219-
for line in f:
220-
nw_version.values.append(line.strip())
221-
f.close()
222-
except IOError:
223-
nw_version.values.append(nw_version.default_value)
224-
225213
def create_application_layout(self):
226214
"""Create all widgets and set the central widget."""
227215
self.main_layout = QtGui.QVBoxLayout()

0 commit comments

Comments
 (0)