From 0c590c820e9b8cda17dbceb5c425a3eb650e9b47 Mon Sep 17 00:00:00 2001 From: Disassembler Date: Sun, 26 Apr 2020 17:26:29 +0200 Subject: [PATCH] Fix app status output --- usr/bin/spoc-app | 4 ++-- usr/lib/python3.8/spoc/app.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/usr/bin/spoc-app b/usr/bin/spoc-app index 17f70bd..425db32 100755 --- a/usr/bin/spoc-app +++ b/usr/bin/spoc-app @@ -81,8 +81,8 @@ def stop(app_name): def status(app_name): # Print status of all application containers - for container,status in App(app_name).status(): - print(f'{container}: {status}') + for container,status in sorted(App(app_name).status().items()): + print(f'{container}: {status.value}') def publish(filename, force): app_name = os.path.basename(os.path.dirname(os.path.abspath(filename))) diff --git a/usr/lib/python3.8/spoc/app.py b/usr/lib/python3.8/spoc/app.py index ef7ae0b..80238e0 100644 --- a/usr/lib/python3.8/spoc/app.py +++ b/usr/lib/python3.8/spoc/app.py @@ -165,7 +165,7 @@ class App: def status(self): # Return status for all application containers - return {container.name:container.get_state() for container in sorted(self.containers)} + return {container.name:container.get_state() for container in self.containers} def is_running(self): # Convenience method to determine if any of the application's containers are running