Skip to content

Commit 55b163c

Browse files
committed
qtvcp -istat: fix error when designer run because there is no real INI
qtplasmac check failed if there was no entry at all
1 parent bc8b2f4 commit 55b163c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/python/qtvcp/qt_istat.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,10 @@ def update(self):
109109
self.MACRO_PATH = None
110110
self.INI_MACROS = self.INI.findall("DISPLAY", "MACRO")
111111
self.MACHINE_IS_LATHE = bool(self.INI.find("DISPLAY", "LATHE"))
112-
self.MACHINE_IS_QTPLASMAC = 'qtplasmac' in self.INI.find("DISPLAY", "DISPLAY")
113-
112+
try:
113+
self.MACHINE_IS_QTPLASMAC = 'qtplasmac' in self.INI.find("DISPLAY", "DISPLAY")
114+
except:
115+
self.MACHINE_IS_QTPLASMAC = False
114116
extensions = self.INI.findall("FILTER", "PROGRAM_EXTENSION")
115117
self.PROGRAM_FILTERS = ([e.split(None, 1) for e in extensions]) or None
116118
self.PROGRAM_FILTERS_EXTENSIONS = self.get_filters_extensions()

0 commit comments

Comments
 (0)