Moved errors in dedicated file

This commit is contained in:
RemixDev
2021-08-02 21:55:22 +02:00
parent 0b8647845c
commit 834de5a09c
6 changed files with 108 additions and 104 deletions

View File

@ -10,6 +10,7 @@ from deemix.utils.crypto import _md5, _ecbCrypt, _ecbDecrypt, generateBlowfishKe
from deemix.utils import USER_AGENT_HEADER
from deemix.types.DownloadObjects import Single
from deemix.errors import DownloadCanceled, DownloadEmpty
logger = logging.getLogger('deemix')
@ -101,9 +102,3 @@ def streamTrack(outputStream, track, start=0, downloadObject=None, listener=None
except (RequestsConnectionError, ReadTimeout, ChunkedEncodingError):
sleep(2)
streamTrack(outputStream, track, start, downloadObject, listener)
class DownloadCanceled(Exception):
pass
class DownloadEmpty(Exception):
pass