fix insertion upload check when daemon is not running
This commit is contained in:
parent
00baf30141
commit
f401518d24
@ -41,10 +41,14 @@ def _check_upload_queue():
|
|||||||
"""
|
"""
|
||||||
max_upload_queue: int = 5000
|
max_upload_queue: int = 5000
|
||||||
queue = localcommand.local_command('/gethidden', maxWait=10)
|
queue = localcommand.local_command('/gethidden', maxWait=10)
|
||||||
up_queue = len(queue.splitlines())
|
|
||||||
|
|
||||||
if up_queue >= max_upload_queue:
|
try:
|
||||||
raise OverflowError
|
up_queue = len(queue.splitlines())
|
||||||
|
except AttributeError:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
if up_queue >= max_upload_queue:
|
||||||
|
raise OverflowError
|
||||||
return up_queue
|
return up_queue
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user