Fix #307 - Nonsense value for LastPlayed?
This commit is contained in:
parent
9c2b991289
commit
6234f25226
@ -70,7 +70,12 @@ class WorldListItemWidget(QtGui.QWidget):
|
|||||||
def setWorldInfo(self, (name, lastPlayed, versionInfo)):
|
def setWorldInfo(self, (name, lastPlayed, versionInfo)):
|
||||||
self.displayNameLabel.setText(name)
|
self.displayNameLabel.setText(name)
|
||||||
if lastPlayed:
|
if lastPlayed:
|
||||||
lastPlayedText = arrow.Arrow.fromtimestamp(lastPlayed / 1000.0).humanize()
|
try:
|
||||||
|
lastPlayedText = arrow.Arrow.fromtimestamp(lastPlayed / 1000.0).humanize()
|
||||||
|
except ValueError:
|
||||||
|
# Nonsense value for LastPlayed?
|
||||||
|
lastPlayedText = "Unknown (Timestamp %s)" % (lastPlayed / 1000.0,)
|
||||||
|
|
||||||
self.lastPlayedLabel.setText(lastPlayedText)
|
self.lastPlayedLabel.setText(lastPlayedText)
|
||||||
else:
|
else:
|
||||||
self.lastPlayedLabel.setText("")
|
self.lastPlayedLabel.setText("")
|
||||||
|
Reference in New Issue
Block a user