Remove redundant exception classes and fix existing ones
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
This commit is contained in:
parent
6d07c3c8c4
commit
0de6915222
|
|
@ -1,23 +1,2 @@
|
|||
class DriveAuthError(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class MessageDeletedError(Exception):
|
||||
""" Custom Exception class for killing thread as soon as they aren't needed"""
|
||||
|
||||
def __init__(self, message, error=None):
|
||||
super().__init__(message)
|
||||
self.error = error
|
||||
|
||||
|
||||
class DownloadCancelled(Exception):
|
||||
|
||||
def __init__(self, message, error=None):
|
||||
super().__init__(message)
|
||||
self.error = error
|
||||
|
||||
|
||||
class DirectDownloadLinkException(Exception):
|
||||
def __init__(self, message, error=None):
|
||||
super().__init__(message)
|
||||
self.error = error
|
||||
pass
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ def _mirror(bot, update, isTar=False):
|
|||
try:
|
||||
link = direct_link_generator(link)
|
||||
except DirectDownloadLinkException as e:
|
||||
LOGGER.info(f'{link}: {e.error}')
|
||||
LOGGER.info(f'{link}: {e}')
|
||||
listener = MirrorListener(bot, update, isTar, tag)
|
||||
aria = aria2_download.AriaDownloadHelper(listener)
|
||||
aria.add_download(link, f'{DOWNLOAD_DIR}/{listener.uid}/')
|
||||
|
|
|
|||
Loading…
Reference in New Issue