Added a check to see if nw-versions.txt exists.

This commit is contained in:
Joey Payne 2014-04-05 23:21:40 -06:00
commit f0e874e2f8

View file

@ -202,9 +202,12 @@ class MainWindow(QtGui.QWidget):
def setup_nw_versions(self):
nw_version = self.getSetting('nw_version')
f = open(os.path.join(CWD, 'files','nw-versions.txt'))
for line in f:
nw_version.values.append(line.strip())
try:
f = open(os.path.join(CWD, 'files','nw-versions.txt'))
for line in f:
nw_version.values.append(line.strip())
except IOError:
nw_version.values.append(nw_version.default_value)
def create_application_layout(self):
self.main_layout = QtGui.QVBoxLayout()