Fix app status output

This commit is contained in:
Disassembler 2020-04-26 17:26:29 +02:00
parent da892401dd
commit 0c590c820e
No known key found for this signature in database
GPG Key ID: 524BD33A0EE29499
2 changed files with 3 additions and 3 deletions

View File

@ -81,8 +81,8 @@ def stop(app_name):
def status(app_name): def status(app_name):
# Print status of all application containers # Print status of all application containers
for container,status in App(app_name).status(): for container,status in sorted(App(app_name).status().items()):
print(f'{container}: {status}') print(f'{container}: {status.value}')
def publish(filename, force): def publish(filename, force):
app_name = os.path.basename(os.path.dirname(os.path.abspath(filename))) app_name = os.path.basename(os.path.dirname(os.path.abspath(filename)))

View File

@ -165,7 +165,7 @@ class App:
def status(self): def status(self):
# Return status for all application containers # 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): def is_running(self):
# Convenience method to determine if any of the application's containers are running # Convenience method to determine if any of the application's containers are running