mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Fix misc stuff about utcfromtimestamp usage (tests were broken)
This commit is contained in:
parent
3749bc9790
commit
0179bf2005
1 changed files with 6 additions and 4 deletions
|
@ -36,7 +36,7 @@ import glob
|
||||||
import pwd
|
import pwd
|
||||||
import grp
|
import grp
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
from moulinette import msignals, m18n, msettings
|
from moulinette import msignals, m18n, msettings
|
||||||
from moulinette.core import MoulinetteError
|
from moulinette.core import MoulinetteError
|
||||||
|
@ -81,9 +81,11 @@ def app_listlists():
|
||||||
# Get the list
|
# Get the list
|
||||||
appslist_list = _read_appslist_list()
|
appslist_list = _read_appslist_list()
|
||||||
|
|
||||||
for app in appslist_list:
|
# Convert 'lastUpdate' timestamp to datetime
|
||||||
appslist_list[app]["lastUpdate"] = datetime.datetime.utcfromtimestamp(
|
for name, infos in appslist_list.items():
|
||||||
appslist_list[app].get("lastUpdate"))
|
if infos["lastUpdate"] is None:
|
||||||
|
infos["lastUpdate"] = 0
|
||||||
|
infos["lastUpdate"] = datetime.utcfromtimestamp(infos["lastUpdate"])
|
||||||
|
|
||||||
return appslist_list
|
return appslist_list
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue