Skip to content

Instantly share code, notes, and snippets.

@zerc zerc/helper.py
Created Sep 17, 2013

Embed
What would you like to do?
Логирование трейсбека. И даже не спрашивайте зачем мне это :D
def D(fn):
import traceback
filename = 'trace'
def _(*args, **kwargs):
try:
return fn(*args, **kwargs)
except:
traceback.print_exc(5, open(filename, 'w'))
raise
return _
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.