From 9d1cb02e416f8c32d72ed132d360684ecf4e3dc7 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Wed, 17 Aug 2005 18:21:43 +0000 Subject: [PATCH] * src/GrampsDBCallback.py: look for GRAMPS_SIGNAL environment variable equal to 1 to enable signal debugging svn: r5097 --- gramps2/ChangeLog | 2 ++ gramps2/src/GrampsDBCallback.py | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 8c5a2c38c..f6f696088 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,4 +1,6 @@ 2005-08-17 Don Allingham + * src/GrampsDBCallback.py: look for GRAMPS_SIGNAL environment + variable equal to 1 to enable signal debugging * src/ChooseParents.py: disconnect signals on close, do fewer commits diff --git a/gramps2/src/GrampsDBCallback.py b/gramps2/src/GrampsDBCallback.py index 3c0e40b9f..ea1dc0611 100644 --- a/gramps2/src/GrampsDBCallback.py +++ b/gramps2/src/GrampsDBCallback.py @@ -36,6 +36,7 @@ or the UI code. """ import sys +import os import types import traceback import inspect @@ -213,7 +214,11 @@ class GrampsDBCallback(object): # If this is True logging will be turned on for all instances # whether or not instance based logging is enabled. - __LOG_ALL = False + try: + __LOG_ALL = int(os.environ.get('GRAMPS_SIGNAL',"0")) == 1 + print __LOG_ALL + except: + __LOG_ALL = False def __init__(self): self.__enable_logging = False # controls whether lots of debug