From 5dd47a49105067127b0cc8bb99431af7028f5ade Mon Sep 17 00:00:00 2001 From: hut Date: Sat, 9 Oct 2010 23:01:25 +0200 Subject: core.helper: fixed debug functions --- ranger/core/helper.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ranger/core/helper.py b/ranger/core/helper.py index 0ef0fc27..38460bb6 100644 --- a/ranger/core/helper.py +++ b/ranger/core/helper.py @@ -161,6 +161,7 @@ def log(*objects, **keywords): Writes objects to a logfile (for the purpose of debugging only.) Has the same arguments as print() in python3. """ + from ranger import arg if LOGFILE is None or not arg.debug or arg.clean: return start = 'start' in keywords and keywords['start'] or 'ranger:' sep = 'sep' in keywords and keywords['sep'] or ' ' @@ -170,6 +171,7 @@ def log(*objects, **keywords): def log_traceback(): + from ranger import arg if LOGFILE is None or not arg.debug or arg.clean: return import traceback traceback.print_stack(file=open(LOGFILE, 'a')) -- cgit 1.4.1-2-gfad0