Commit 6eec7a75 by Guba Sándor

adding debug log

parent fb80d4bc
...@@ -12,12 +12,15 @@ def req_connection(original_function): ...@@ -12,12 +12,15 @@ def req_connection(original_function):
''' '''
def new_function(*args, **kwargs): def new_function(*args, **kwargs):
logging.debug("Decorator running")
global connection global connection
if connection is None: if connection is None:
connect() connect()
try: try:
logging.debug("Decorator calling original function")
return_value = original_function(*args, **kwargs) return_value = original_function(*args, **kwargs)
finally: finally:
logging.debug("Finally part of decorator")
disconnect() disconnect()
return return_value return return_value
return new_function return new_function
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment