mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] other part of the code didn't expected this new datastructure
This commit is contained in:
parent
1d24c24abb
commit
979123bf61
1 changed files with 10 additions and 6 deletions
|
@ -431,12 +431,15 @@ def get_installed_version(*pkgnames, **kwargs):
|
||||||
raise UninstalledPackage(pkgname)
|
raise UninstalledPackage(pkgname)
|
||||||
repo = ""
|
repo = ""
|
||||||
|
|
||||||
versions[pkgname] = {
|
if as_dict:
|
||||||
"version": version,
|
versions[pkgname] = {
|
||||||
# when we don't have component it's because it's from a local
|
"version": version,
|
||||||
# install or from an image (like in vagrant)
|
# when we don't have component it's because it's from a local
|
||||||
"repo": repo if repo else "local",
|
# install or from an image (like in vagrant)
|
||||||
}
|
"repo": repo if repo else "local",
|
||||||
|
}
|
||||||
|
else:
|
||||||
|
versions[pkgname] = version
|
||||||
|
|
||||||
if len(pkgnames) == 1 and not as_dict:
|
if len(pkgnames) == 1 and not as_dict:
|
||||||
return versions[pkgnames[0]]
|
return versions[pkgnames[0]]
|
||||||
|
@ -458,4 +461,5 @@ def ynh_packages_version(*args, **kwargs):
|
||||||
"""Return the version of each YunoHost package"""
|
"""Return the version of each YunoHost package"""
|
||||||
return get_installed_version(
|
return get_installed_version(
|
||||||
'yunohost', 'yunohost-admin', 'moulinette', 'ssowat',
|
'yunohost', 'yunohost-admin', 'moulinette', 'ssowat',
|
||||||
|
as_dict=True
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue