mirror of
https://github.com/rembo10/headphones.git
synced 2026-07-20 07:54:01 +01:00
Temporary Debugging
Print source of exception
This commit is contained in:
@@ -123,6 +123,14 @@ def request_response(url, method="get", auto_raise=True,
|
|||||||
"Request raise HTTP error with status code %d (%s).",
|
"Request raise HTTP error with status code %d (%s).",
|
||||||
e.response.status_code, cause)
|
e.response.status_code, cause)
|
||||||
|
|
||||||
|
# REMOVE LATER - FOR DEBUGGING
|
||||||
|
super_debug = True
|
||||||
|
if super_debug:
|
||||||
|
import os
|
||||||
|
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||||
|
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||||
|
logger.error('SUPER_DEBUG: ' + '; '.join([exc_type, fname, exc_tb.tb_lineno]))
|
||||||
|
|
||||||
# Debug response
|
# Debug response
|
||||||
if headphones.VERBOSE:
|
if headphones.VERBOSE:
|
||||||
server_message(e.response)
|
server_message(e.response)
|
||||||
|
|||||||
Reference in New Issue
Block a user