yt.funcs.
paste_traceback
This is a traceback handler that knows how to paste to the pastebin. Should only be used in sys.excepthook.