From 1c1665312e4e9c85915f356d57862dc0080bf2bd Mon Sep 17 00:00:00 2001 From: shportix Date: Tue, 7 Nov 2023 12:19:54 +0200 Subject: [PATCH] winebuild fix undone --- src/bitmessagemain.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/bitmessagemain.py b/src/bitmessagemain.py index 35d41f53e..2c0ba704a 100755 --- a/src/bitmessagemain.py +++ b/src/bitmessagemain.py @@ -19,6 +19,7 @@ app_dir = pathmagic.setup() import depends + depends.check_dependencies() import helper_sql @@ -50,10 +51,6 @@ addressGenerator, objectProcessor, singleCleaner, singleWorker, sqlThread) -def wait_until_sql_available(): - while not helper_sql.sql_available: - time.sleep(0.25) - def signal_handler(signum, frame): """Single handler for any signal sent to pybitmessage""" process = multiprocessing.current_process() @@ -87,6 +84,7 @@ def signal_handler(signum, frame): class Main(object): """Main PyBitmessage class""" + def start(self): """Start main application""" # pylint: disable=too-many-statements,too-many-branches,too-many-locals @@ -183,12 +181,9 @@ def start(self): sqlLookup.daemon = False sqlLookup.start() - - Inventory() # init if state.enableObjProc: # Not needed if objproc is disabled - wait_until_sql_available() shared.reloadMyAddressHashes() shared.reloadBroadcastSendersForWhichImWatching() @@ -273,8 +268,8 @@ def start(self): while state.shutdown == 0: time.sleep(1) if ( - state.testmode - and time.time() - state.last_api_response >= 30 + state.testmode + and time.time() - state.last_api_response >= 30 ): self.stop() elif not state.enableGUI: @@ -397,7 +392,6 @@ def main(): if __name__ == "__main__": main() - # So far, the creation of and management of the Bitmessage protocol and this # client is a one-man operation. Bitcoin tips are quite appreciated. # 1H5XaDA6fYENLbknwZyjiYXYPQaFjjLX2u