From babda1dd245e5866e74453725e3e0f0e17aee03e Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 27 Jun 2020 15:38:15 +0100 Subject: [PATCH] print warning when loading legacy canvas group pos file; fix lint Signed-off-by: falkTX --- .travis/script-pylint.sh | 1 + source/frontend/carla_host.py | 1 + source/frontend/widgets/racklistwidget.py | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis/script-pylint.sh b/.travis/script-pylint.sh index d50c338be..b37b84ebb 100755 --- a/.travis/script-pylint.sh +++ b/.travis/script-pylint.sh @@ -19,6 +19,7 @@ ${pylint} \ --max-line-length=120 \ --max-locals=25 \ --max-statements=100 \ + --enable=bad-continuation \ --disable=\ bad-whitespace,\ broad-except,\ diff --git a/source/frontend/carla_host.py b/source/frontend/carla_host.py index 6c4baffbf..c35ebee8c 100644 --- a/source/frontend/carla_host.py +++ b/source/frontend/carla_host.py @@ -806,6 +806,7 @@ class HostWindow(QMainWindow): except: return + print("NOTICE: loading old-style canvas group positions via legacy json file") patchcanvas.restoreGroupPositions(canvasdata) QTimer.singleShot(1000, self.slot_canvasRefresh) diff --git a/source/frontend/widgets/racklistwidget.py b/source/frontend/widgets/racklistwidget.py index 8bbd51322..f2c4fab4f 100644 --- a/source/frontend/widgets/racklistwidget.py +++ b/source/frontend/widgets/racklistwidget.py @@ -338,8 +338,8 @@ class RackListWidget(QListWidget): if not self.host.load_file(filename): CustomMessageBox(self, QMessageBox.Critical, self.tr("Error"), - self.tr("Failed to load file"), - self.host.get_last_error(), QMessageBox.Ok, QMessageBox.Ok) + self.tr("Failed to load file"), + self.host.get_last_error(), QMessageBox.Ok, QMessageBox.Ok) continue if filename.endswith(".carxp"):