From 48ad7b5f02db8007434d06d75608e441f9098208 Mon Sep 17 00:00:00 2001 From: Gregoo Date: Sat, 25 Jan 2025 22:48:10 +0100 Subject: [PATCH] Trim the url in the progress message to make it more legible --- bricktracker/instructions.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bricktracker/instructions.py b/bricktracker/instructions.py index 5f91836..cc5cee7 100644 --- a/bricktracker/instructions.py +++ b/bricktracker/instructions.py @@ -111,11 +111,14 @@ class BrickInstructions(object): url = current_app.config['REBRICKABLE_LINK_INSTRUCTIONS_PATTERN'].format( # noqa: E501 path=path ) + trimmed_url = current_app.config['REBRICKABLE_LINK_INSTRUCTIONS_PATTERN'].format( # noqa: E501 + path=path.partition('/')[0] + ) # Request the file self.socket.progress( message='Requesting {url}'.format( - url=url, + url=trimmed_url, ) ) @@ -133,7 +136,7 @@ class BrickInstructions(object): # Downloading the file self.socket.progress( message='Downloading {url} ({size})'.format( - url=url, + url=trimmed_url, size=self.human_size(), ) )