projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Disable travis irc notifications
[youtube-dl]
/
youtube_dl
/
utils.py
diff --git
a/youtube_dl/utils.py
b/youtube_dl/utils.py
index 91e1803265dd88d3c50943c44cbb598fd4a139b1..8f856ee8c073dd9095f2b62b1567eabdb321c117 100644
(file)
--- a/
youtube_dl/utils.py
+++ b/
youtube_dl/utils.py
@@
-8,6
+8,7
@@
import locale
import os
import re
import sys
import os
import re
import sys
+import traceback
import zlib
import email.utils
import json
import zlib
import email.utils
import json
@@
-414,12
+415,15
@@
def encodeFilename(s):
class ExtractorError(Exception):
"""Error during info extraction."""
def __init__(self, msg, tb=None):
class ExtractorError(Exception):
"""Error during info extraction."""
def __init__(self, msg, tb=None):
- """ tb
is the original traceback (so that it can be printed out)
"""
+ """ tb
, if given, is the original traceback (so that it can be printed out).
"""
super(ExtractorError, self).__init__(msg)
super(ExtractorError, self).__init__(msg)
- if tb is None:
- tb = sys.exc_info()[2]
self.traceback = tb
self.traceback = tb
+ def format_traceback(self):
+ if self.traceback is None:
+ return None
+ return u''.join(traceback.format_tb(self.traceback))
+
class DownloadError(Exception):
"""Download Error exception.
class DownloadError(Exception):
"""Download Error exception.