From 363162d2ede64c9db1806cb69bed008f214617b3 Mon Sep 17 00:00:00 2001 From: Werner Van Geit Date: Tue, 16 Apr 2024 09:48:13 +0200 Subject: [PATCH] Show file location script is waiting for --- src/handshakers.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/handshakers.py b/src/handshakers.py index abe43e3..1875763 100644 --- a/src/handshakers.py +++ b/src/handshakers.py @@ -1,7 +1,7 @@ -import logging import json -import time +import logging import pathlib as pl +import time logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) @@ -69,7 +69,8 @@ def shake_initiator(self): def try_handshake(): handshake_input_content = self.read_until_path_exists( self.handshake_input_path, - wait_message="Waiting for handshake confirmation ...", + wait_message="Waiting for handshake confirmation at " + f"{self.handshake_input_path}...", ) return json.loads(handshake_input_content) @@ -85,7 +86,8 @@ def try_handshake(): else: if waiter % self.print_polling_interval == 0: logger.info( - "Waiting for correct handshake registration confirmation ..." + "Waiting for correct handshake registration " + "confirmation ..." ) waiter += 1 time.sleep(self.polling_interval) @@ -117,7 +119,8 @@ def shake_receiver(self): handshake_in = json.loads( self.read_until_path_exists( self.handshake_input_path, - wait_message="Waiting for handshake file ...", + wait_message="Waiting for handshake file at " + f"{self.handshake_input_path} ...", ) ) @@ -150,7 +153,7 @@ def shake_receiver(self): raise ValueError(f"Invalid handshake command: {command}") if waiter % self.print_polling_interval == 0: - logger.info("Waiting for registration confirmation...") + logger.info("Waiting for registration confirmation ...") time.sleep(self.polling_interval) waiter += 1