spaceapi: prevent 'used before assignment' error
@@ -98,6 +98,8 @@ class Py3status:
if 'lastchange' in data['state'].keys():
dt = datetime.datetime.fromtimestamp(data['state']['lastchange'])
lastchanged = dt.strftime(self.format_lastchanged)
+ else:
+ lastchanged = 'unknown'
full_text = self.py3.safe_format(
self.format, {'state': state, 'lastchanged': lastchanged})
