mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Moar lazy loading
This commit is contained in:
parent
dda095dc15
commit
8bd2104722
1 changed files with 6 additions and 7 deletions
13
src/tools.py
13
src/tools.py
|
@ -30,13 +30,6 @@ from moulinette import Moulinette, m18n
|
||||||
from moulinette.utils.process import call_async_output
|
from moulinette.utils.process import call_async_output
|
||||||
from moulinette.utils.filesystem import read_yaml, write_to_yaml, cp, mkdir, rm, chown
|
from moulinette.utils.filesystem import read_yaml, write_to_yaml, cp, mkdir, rm, chown
|
||||||
|
|
||||||
from yunohost.app import (
|
|
||||||
app_upgrade,
|
|
||||||
app_list,
|
|
||||||
_list_upgradable_apps,
|
|
||||||
)
|
|
||||||
from yunohost.firewall import firewall_upnp
|
|
||||||
from yunohost.service import service_start, service_enable
|
|
||||||
from yunohost.utils.system import (
|
from yunohost.utils.system import (
|
||||||
_dump_sources_list,
|
_dump_sources_list,
|
||||||
_list_upgradable_apt_packages,
|
_list_upgradable_apt_packages,
|
||||||
|
@ -159,6 +152,9 @@ def tools_postinstall(
|
||||||
from yunohost.domain import domain_main_domain, domain_add
|
from yunohost.domain import domain_main_domain, domain_add
|
||||||
from yunohost.user import user_create, ADMIN_ALIASES
|
from yunohost.user import user_create, ADMIN_ALIASES
|
||||||
from yunohost.app_catalog import _update_apps_catalog
|
from yunohost.app_catalog import _update_apps_catalog
|
||||||
|
from yunohost.firewall import firewall_upnp
|
||||||
|
from yunohost.service import service_start, service_enable
|
||||||
|
|
||||||
import psutil
|
import psutil
|
||||||
|
|
||||||
# Do some checks at first
|
# Do some checks at first
|
||||||
|
@ -300,6 +296,7 @@ def tools_update(target=None):
|
||||||
Update apps & system package cache
|
Update apps & system package cache
|
||||||
"""
|
"""
|
||||||
from yunohost.app_catalog import _update_apps_catalog
|
from yunohost.app_catalog import _update_apps_catalog
|
||||||
|
from yunohost.app import _list_upgradable_apps
|
||||||
|
|
||||||
if not target:
|
if not target:
|
||||||
target = "all"
|
target = "all"
|
||||||
|
@ -406,6 +403,8 @@ def tools_upgrade(operation_logger, target=None):
|
||||||
system -- True to upgrade system
|
system -- True to upgrade system
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
from yunohost.app import app_upgrade, app_list
|
||||||
|
|
||||||
if dpkg_is_broken():
|
if dpkg_is_broken():
|
||||||
raise YunohostValidationError("dpkg_is_broken")
|
raise YunohostValidationError("dpkg_is_broken")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue