Fanger TSTP-signalet (^Z) hvis konfigurasjonen ber om det.

This commit is contained in:
Øystein Ingmar Skartsæterhagen 2010-05-12 16:49:37 +00:00
parent 4cd817c70f
commit 302f5fb7fa
2 changed files with 4 additions and 1 deletions

View File

@ -1,3 +1,4 @@
db_url = 'sqlite:///data' db_url = 'sqlite:///data'
quit_allowed = True quit_allowed = True
stop_allowed = False
show_tracebacks = True show_tracebacks = True

View File

@ -4,6 +4,7 @@ import sqlalchemy
import re import re
import sys import sys
import traceback import traceback
import signal
from helpers import * from helpers import *
exit_commands = ['exit', 'abort', 'quit', 'bye', 'eat flaming death'] 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) 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', main = Menu('Dibbler main menu',
items=[BuyMenu(), ProductListMenu(), ShowUserMenu(), items=[BuyMenu(), ProductListMenu(), ShowUserMenu(),
AdjustCreditMenu(), TransferMenu(), AdjustCreditMenu(), TransferMenu(),