1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-30 23:24:16 +01:00

justin: don't assume Exception has message attribute

In Python3, the Exception class does not have a message attribute.
Stringifying the Exception object results in the same thing though,
and it works in both Python 2 and 3.
This commit is contained in:
Olof Johansson 2014-03-19 22:48:40 +01:00
parent b31f6f6d85
commit c906b989c2

View File

@ -50,12 +50,12 @@ class Justin(Service):
try: try:
self._get_video(urlp, options) self._get_video(urlp, options)
except JustinUrlException as e: except JustinUrlException as e:
log.debug(e.message) log.debug(str(e))
try: try:
self._get_channel(urlp, options) self._get_channel(urlp, options)
except JustinUrlException as e: except JustinUrlException as e:
log.debug(e.message) log.debug(str(e))
log.error("Can't find media for URL") log.error("Can't find media for URL")
sys.exit(2) sys.exit(2)