diff --git a/conf.py b/conf.py index 1830813..d55c10c 100644 --- a/conf.py +++ b/conf.py @@ -1,3 +1,4 @@ db_url = 'sqlite:///data' quit_allowed = True +stop_allowed = False show_tracebacks = True diff --git a/text_based.py b/text_based.py index c085cb6..0ed5d9c 100755 --- a/text_based.py +++ b/text_based.py @@ -4,6 +4,7 @@ import sqlalchemy import re import sys import traceback +import signal from helpers import * exit_commands = ['exit', 'abort', 'quit', 'bye', 'eat flaming death'] @@ -682,7 +683,8 @@ def retrieve_product(search_str, session): return search_ui(search_product, search_str, 'product', session) -#main = MainMenu() +if not conf.stop_allowed: + signal.signal(signal.SIGTSTP, signal.SIG_IGN) main = Menu('Dibbler main menu', items=[BuyMenu(), ProductListMenu(), ShowUserMenu(), AdjustCreditMenu(), TransferMenu(),