Added a check to see if nw-versions.txt exists.
This commit is contained in:
parent
c2ce6a475a
commit
f0e874e2f8
1 changed files with 6 additions and 3 deletions
9
main.py
9
main.py
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue