mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] would have failed on status.get returning None
This commit is contained in:
parent
d0b9eb1bdd
commit
6ec5a916f3
1 changed files with 1 additions and 1 deletions
|
@ -263,7 +263,7 @@ def service_status(names=[]):
|
|||
'active': str(status.get("ActiveState", "unknown")),
|
||||
'active_at': {
|
||||
"timestamp": str(status.get("ActiveEnterTimestamp", "unknown")),
|
||||
"human": datetime.fromtimestamp(status.get("ActiveEnterTimestamp") / 1000000).strftime("%F %X"),
|
||||
"human": datetime.fromtimestamp(status["ActiveEnterTimestamp"] / 1000000).strftime("%F %X") if "ActiveEnterTimestamp" in status else "unknown",
|
||||
},
|
||||
'description': description,
|
||||
'service_file_path': str(status.get("FragmentPath", "unknown")),
|
||||
|
|
Loading…
Add table
Reference in a new issue