From edd1ed849a8d2a5561a4adea9af7be36d659d9ee Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Tue, 1 Apr 2014 18:32:19 +0100 Subject: [PATCH] minor fixes --- openlp/core/common/__init__.py | 4 +++- openlp/plugins/bibles/lib/db.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/openlp/core/common/__init__.py b/openlp/core/common/__init__.py index 03bf964bc..8df86032e 100644 --- a/openlp/core/common/__init__.py +++ b/openlp/core/common/__init__.py @@ -51,8 +51,10 @@ def trace_error_handler(logger): :param logger: logger to use so traceback is logged to correct class """ + log_string = "OpenLP Error trace" for tb in traceback.extract_stack(): - logger.error('Called by ' + tb[3] + ' at line ' + str(tb[1]) + ' in ' + tb[0]) + log_string = ('%s\n File %s at line %d \n\t called %s' % (log_string, tb[0], tb[1], tb[3])) + logger.error(log_string) def check_directory_exists(directory, do_not_log=False): diff --git a/openlp/plugins/bibles/lib/db.py b/openlp/plugins/bibles/lib/db.py index 743bb01c6..9ffa5d53e 100644 --- a/openlp/plugins/bibles/lib/db.py +++ b/openlp/plugins/bibles/lib/db.py @@ -561,7 +561,7 @@ class BiblesResourcesDB(QtCore.QObject, Manager): Return a book by name or abbreviation. :param name: The name or abbreviation of the book. - :param lower: True if the comparsion should be only lowercase + :param lower: True if the comparison should be only lowercase """ log.debug('BiblesResourcesDB.get_book("%s")', name) if not isinstance(name, str):