diff --git a/usr/lib/python3.6/vmmgr/appmgr.py b/usr/lib/python3.6/vmmgr/appmgr.py index 2c9197b..dc7f6f5 100644 --- a/usr/lib/python3.6/vmmgr/appmgr.py +++ b/usr/lib/python3.6/vmmgr/appmgr.py @@ -71,7 +71,7 @@ class AppMgr: item.data = math.floor(int(progress[0]) / int(progress[1]) * 100) # If the apk command didn't finish with returncode 0, raise an exception if p.returncode: - raise CalledProcessError(p.returncode, cmd) + raise subprocess.CalledProcessError(p.returncode, p.args) def uninstall_app(self, item): # Main uninstallation function. Wrapper for uninstallation via native package manager diff --git a/usr/lib/python3.6/vmmgr/vmmgr.py b/usr/lib/python3.6/vmmgr/vmmgr.py index b63202f..694d162 100644 --- a/usr/lib/python3.6/vmmgr/vmmgr.py +++ b/usr/lib/python3.6/vmmgr/vmmgr.py @@ -27,18 +27,19 @@ class VMMgr: 'login': login if login else 'N/A', 'password': password if password else 'N/A', 'visible': False} - self.save_and_reload_config() + self.conf.save() + self.reload_wsgi_config() def unregister_app(self, app): # Unregister application during uninstallation (called at the end of package uninstall.sh) if app not in self.conf['apps']: return del self.conf['apps'][app] - self.save_and_reload_config() - - def reload_config(self): - # Attempt to contact running vmmgr WSGI application to reload config self.conf.save() + self.reload_wsgi_config() + + def reload_wsgi_config(self): + # Attempt to contact running vmmgr WSGI application to reload config try: requests.get('http://127.0.0.1:8080/reload-config', timeout=3) except: diff --git a/usr/lib/python3.6/vmmgr/wsgiapp.py b/usr/lib/python3.6/vmmgr/wsgiapp.py index d6fd7b6..0ccd95f 100644 --- a/usr/lib/python3.6/vmmgr/wsgiapp.py +++ b/usr/lib/python3.6/vmmgr/wsgiapp.py @@ -204,13 +204,13 @@ class WSGIApp: status = lang.status_stopping() elif item.action == self.appmgr.install_app: if not item.started: - status = '{} ({})'.format(lang.status_downloading(), lang.status_queued()) + status = '{} ({})'.format(lang.status_installing(), lang.status_queued()) elif isinstance(item.data, BaseException): status = '{} OK'.format(lang.package_manager_error()) actions = None else: if item.data < 100: - status = '{} ({} %)'.format(lang.status_downloading(), item.data) + status = '{} ({} %)'.format(lang.status_installing(), item.data) else: status = lang.status_installing() elif item.action == self.appmgr.uninstall_app: diff --git a/usr/lib/python3.6/vmmgr/wsgilang.py b/usr/lib/python3.6/vmmgr/wsgilang.py index 37bb726..7c99e48 100644 --- a/usr/lib/python3.6/vmmgr/wsgilang.py +++ b/usr/lib/python3.6/vmmgr/wsgilang.py @@ -36,7 +36,6 @@ class WSGILang: 'status_started': 'Spuštěna', 'status_stopping': 'Zastavuje se', 'status_stopped': 'Zastavena', - 'status_downloading': 'Stahuje se', 'status_installing': 'Instaluje se', 'status_uninstalling': 'Odinstalovává se', 'status_not_installed': 'Není nainstalována',