Resolve comment about numbered format string in dialog

This commit is contained in:
Veronica K. B. Olsen
2021-02-15 18:03:36 +01:00
parent 31b665d344
commit 2f57a4f86f
+5 -8
View File
@@ -466,16 +466,13 @@ class GuiMain(QMainWindow):
lockDetails = ( lockDetails = (
"<br>%s" % self.tr( "<br>%s" % self.tr(
"The project was locked by the computer " "The project was locked by the computer "
"'{computerName}' ({osName} {osVersion}), " "'{0}' ({1} {2}), last active on {3}."
"last active on {activeTime}"
) )
).format( ).format(
computerName = self.theProject.lockedBy[0], self.theProject.lockedBy[0],
osName = self.theProject.lockedBy[1], self.theProject.lockedBy[1],
osVersion = self.theProject.lockedBy[2], self.theProject.lockedBy[2],
activeTime = datetime.fromtimestamp( datetime.fromtimestamp(int(self.theProject.lockedBy[3])).strftime("%x %X")
int(self.theProject.lockedBy[3])
).strftime("%x %X")
) )
except Exception: except Exception:
lockDetails = "" lockDetails = ""