From 0c50cd096227d39cf2abda00c035f53fa8a3f79b Mon Sep 17 00:00:00 2001 From: mpgn Date: Thu, 23 Mar 2023 16:13:44 -0400 Subject: [PATCH] add exist function to cmedb --- cme/cmedb.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/cme/cmedb.py b/cme/cmedb.py index 4314db2f..34d5cc82 100644 --- a/cme/cmedb.py +++ b/cme/cmedb.py @@ -50,11 +50,6 @@ def print_table(data, title=None): print(table.table) print("") - -# def do_exit(): -# sys.exit(0) - - def write_csv(filename, headers, entries): """ Writes a CSV file with the provided parameters. @@ -442,6 +437,14 @@ class CMEDBMenu(cmd.Cmd): """ print_help(help_string) + def do_exit(self, line): + sys.exit() + + def help_exit(self): + help_string = """ + Exits + """ + print_help(help_string) def initialize_db(logger): if not os.path.exists(os.path.join(WS_PATH, 'default')):