From 795aa23c89c809f480d8a329af8365691ed8e5a5 Mon Sep 17 00:00:00 2001 From: askiiart <--global> Date: Thu, 15 Dec 2022 11:46:11 -0600 Subject: [PATCH] Finish basic management --- basic_management.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/basic_management.py b/basic_management.py index 1f7e263..19f70ec 100644 --- a/basic_management.py +++ b/basic_management.py @@ -37,14 +37,14 @@ while True: elif selection == 'start': status = Docker.start(container) - if status == '0': + if status == 0: print(f'{container} started successfully') else: print(f'{container} did NOT start successfully. Exit code: {status}') elif selection == 'stop': status = Docker.stop(container) - if status == '0': + if status == 0: print(f'{container} stopped successfully') else: print(f'{container} was NOT stopped successfully. Exit code: {status}') @@ -57,10 +57,12 @@ while True: if selection == 'y' or selection == 'Y': print('Deleting...') status = Docker.rm(container) - # TODO: Add status logic + if status == 0: + print(f'{container} has been deleted') print('Done') elif selection == 'n' or selection == 'N': print(f'Operation cancelled, returning to {container} menu...') + break elif selection == 'menu': print('Returning to main menu...')