fixed an issue
the list comprehension could raise `RuntimeError` so i put try and except.
This commit is contained in:
parent
825db56fc5
commit
cc4a46127d
|
|
@ -107,7 +107,11 @@ class Client:
|
||||||
except TimeoutError:
|
except TimeoutError:
|
||||||
# dont know why it TimeoutError simply happens
|
# dont know why it TimeoutError simply happens
|
||||||
# but if it does then manually waiting for each func
|
# but if it does then manually waiting for each func
|
||||||
[await func for func in processes]
|
for process in processes:
|
||||||
|
try:
|
||||||
|
await process
|
||||||
|
except RuntimeError:
|
||||||
|
continue
|
||||||
|
|
||||||
# tracks are jumbled for huge playlists so we use this to sort it out
|
# tracks are jumbled for huge playlists so we use this to sort it out
|
||||||
tracks.sort(key=lambda i: False if isinstance(i, Track) else i[0])
|
tracks.sort(key=lambda i: False if isinstance(i, Track) else i[0])
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue