From f401518d2454fcd3bd1b9c6a39e8165b3e575e13 Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Wed, 27 Nov 2019 13:53:06 -0600 Subject: [PATCH] fix insertion upload check when daemon is not running --- src/onionrblocks/insert.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/onionrblocks/insert.py b/src/onionrblocks/insert.py index 8378538c..bf26ab4a 100644 --- a/src/onionrblocks/insert.py +++ b/src/onionrblocks/insert.py @@ -41,10 +41,14 @@ def _check_upload_queue(): """ max_upload_queue: int = 5000 queue = localcommand.local_command('/gethidden', maxWait=10) - up_queue = len(queue.splitlines()) - if up_queue >= max_upload_queue: - raise OverflowError + try: + up_queue = len(queue.splitlines()) + except AttributeError: + pass + else: + if up_queue >= max_upload_queue: + raise OverflowError return up_queue