Merge pull request #13172 from digitalfrost/310822

MachineAction.py: Use error method with Logger
This commit is contained in:
Jaime van Kessel 2022-08-31 14:11:31 +02:00 committed by GitHub
commit 5daf45e750
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -94,7 +94,7 @@ class MachineAction(QObject, PluginObject):
plugin_path = PluginRegistry.getInstance().getPluginPath(self.getPluginId())
if plugin_path is None:
Logger.log("e", "Cannot create QML view: cannot find plugin path for plugin [%s]", self.getPluginId())
Logger.error(f"Cannot create QML view: cannot find plugin path for plugin {self.getPluginId()}")
return None
path = os.path.join(plugin_path, self._qml_url)
@ -106,7 +106,7 @@ class MachineAction(QObject, PluginObject):
def qmlPath(self) -> "QUrl":
plugin_path = PluginRegistry.getInstance().getPluginPath(self.getPluginId())
if plugin_path is None:
Logger.log("e", "Cannot create QML view: cannot find plugin path for plugin [%s]", self.getPluginId())
Logger.error(f"Cannot create QML view: cannot find plugin path for plugin {self.getPluginId()}")
return QUrl("")
path = os.path.join(plugin_path, self._qml_url)
return QUrl.fromLocalFile(path)