Update check-nextcloud

This commit is contained in:
Thorsten Spille 2022-01-30 22:59:51 +01:00 committed by GitHub
parent f10f63d45d
commit d8d8bac1d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,7 +42,7 @@ def update_check(conf:dict):
result = occ("update:check", conf['nc_www_user'],conf['nc_path'], conf['nc_php_version']) result = occ("update:check", conf['nc_www_user'],conf['nc_path'], conf['nc_php_version'])
if len(result.split('\n')) > 2: if len(result.split('\n')) > 2:
updates = "Updates:\n" + "\n".join(map(lambda x: "{0}:{1}".format(*x),re.findall("(\w+)(?:\sto version)?\s([\d+.]+) is available",result))) updates = "Updates: " + " ".join(map(lambda x: "{0}:{1}".format(*x),re.findall("(\w+)(?:\sto version)?\s([\d+.]+) is available",result)))
count = result.split('\n')[-2].split(' ')[0] count = result.split('\n')[-2].split(' ')[0]
else: else:
updates = result updates = result