From 4a51513469a8d486b195b5c4eb783356342aef7c Mon Sep 17 00:00:00 2001 From: deajan Date: Sat, 12 Oct 2024 20:12:32 +0200 Subject: [PATCH] Cite sources ;) --- npbackup/__debug__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/npbackup/__debug__.py b/npbackup/__debug__.py index d031c6f..4d3878b 100644 --- a/npbackup/__debug__.py +++ b/npbackup/__debug__.py @@ -45,6 +45,10 @@ if not "_DEBUG" in globals(): def exception_to_string(exc): + """ + Transform a catched exception to a string + https://stackoverflow.com/a/37135014/2635443 + """ stack = traceback.extract_stack()[:-3] + traceback.extract_tb( exc.__traceback__ ) # add limit=??