mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
PrintInformation.py Use warning method with Logger
Use f-string and warning method with Logger instead of "Old Style string formatting
This commit is contained in:
parent
2d3ad84167
commit
f30fd519b7
1 changed files with 2 additions and 2 deletions
|
@ -186,7 +186,7 @@ class PrintInformation(QObject):
|
||||||
|
|
||||||
if time != time: # Check for NaN. Engine can sometimes give us weird values.
|
if time != time: # Check for NaN. Engine can sometimes give us weird values.
|
||||||
duration.setDuration(0)
|
duration.setDuration(0)
|
||||||
Logger.log("w", "Received NaN for print duration message")
|
Logger.warning("Received NaN for print duration message")
|
||||||
continue
|
continue
|
||||||
|
|
||||||
total_estimated_time += time
|
total_estimated_time += time
|
||||||
|
@ -368,7 +368,7 @@ class PrintInformation(QObject):
|
||||||
mime_type = MimeTypeDatabase.getMimeTypeForFile(name)
|
mime_type = MimeTypeDatabase.getMimeTypeForFile(name)
|
||||||
data = mime_type.stripExtension(name)
|
data = mime_type.stripExtension(name)
|
||||||
except MimeTypeNotFoundError:
|
except MimeTypeNotFoundError:
|
||||||
Logger.log("w", "Unsupported Mime Type Database file extension %s", name)
|
Logger.warning(f"Unsupported Mime Type Database file extension {name}")
|
||||||
|
|
||||||
if data is not None and check_name is not None:
|
if data is not None and check_name is not None:
|
||||||
self._base_name = data
|
self._base_name = data
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue