Skip to content

Commit 2609203

Browse files
committed
Fix metrics/exceptions/settings circ. dependency
1 parent 146189d commit 2609203

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/classes/exceptions.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,12 @@
3131

3232
from classes import info
3333
from classes.logger import log
34-
from classes.metrics import track_exception_stacktrace, track_metric_error
3534

3635

3736
def ExceptionHandler(exeception_type, exeception_value, exeception_traceback):
3837
"""Callback for any unhandled exceptions"""
38+
from classes.metrics import track_exception_stacktrace
39+
3940
log.error(
4041
'Unhandled Exception',
4142
exc_info=(exeception_type, exeception_value, exeception_traceback))
@@ -71,6 +72,8 @@ def tail_file(f, n, offset=None):
7172

7273
def libopenshot_crash_recovery():
7374
"""Walk libopenshot.log for the last line before this launch"""
75+
from classes.metrics import track_exception_stacktrace, track_metric_error
76+
7477
log_path = os.path.join(info.USER_PATH, "libopenshot.log")
7578
last_log_line = ""
7679
last_stack_trace = ""

src/classes/metrics.py

+1
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@
9191
# incase the user enables metrics later
9292
metric_queue = []
9393

94+
9495
def track_metric_screen(screen_name):
9596
"""Track a GUI screen being shown"""
9697
metric_params = deepcopy(params)

0 commit comments

Comments
 (0)