Skip to content

Instantly share code, notes, and snippets.

@leventengin
leventengin / decorator.txt
Created November 20, 2022 17:12
this is a test gist
def log(utf8_string, tags):
...
def log_on_exception(func):
@functools.wraps(func)
def wrapper_logon_exception(*args, **kwargs):
if not tag1 or not tag2:
return log('an error', tag1, tag2)
return func(*args, **kwargs)