diff mbox series

swupdateclient: fix typo

Message ID 20240419082004.539-1-sam.van.den.berge@gmail.com
State Accepted
Headers show
Series swupdateclient: fix typo | expand

Commit Message

Sam Van Den Berge April 19, 2024, 8:20 a.m. UTC
From: Sam Van Den Berge <sam.van.den.berge@gmail.com>

Fixes the following error:

AttributeError: 'Namespace' object has no attribute 'route'

Signed-off-by: Sam Van Den Berge <sam.van.den.berge@gmail.com>
---
 tools/python/swupdateclient/swupdateclient/main.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sam Van Den Berge May 8, 2024, 6:31 a.m. UTC | #1
On Fri, Apr 19, 2024 at 10:20:04AM +0200, sam.van.den.berge@gmail.com wrote:
> From: Sam Van Den Berge <sam.van.den.berge@gmail.com>
> 
> Fixes the following error:
> 
> AttributeError: 'Namespace' object has no attribute 'route'
> 
> Signed-off-by: Sam Van Den Berge <sam.van.den.berge@gmail.com>
> ---
>  tools/python/swupdateclient/swupdateclient/main.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/python/swupdateclient/swupdateclient/main.py b/tools/python/swupdateclient/swupdateclient/main.py
> index d4230a4..ab78a3d 100644
> --- a/tools/python/swupdateclient/swupdateclient/main.py
> +++ b/tools/python/swupdateclient/swupdateclient/main.py
> @@ -224,7 +224,7 @@ def client(args: List[str]) -> None:
>          args.swu_file,
>          args.host_name,
>          args.port,
> -        args.route,
> +        path=args.path,
>          log_level=args.log_level.upper(),
>      )
>      updater.update(timeout=args.timeout)

Small reminder to this patch since I noticed it hasn't been applied yet.  Maybe
I should have been a bit more verbose in the commit message but this patch is
in fact a fix for 386caee763f.

The patch submitted on the mailing list added an additional argument named
route but because of discussions on the mailing list [1], the route CLI
argument was renamed to path. However it's usage more below in the file was not
renamed and remained route, resulting in the error "AttributeError: 'Namespace'
object has no attribute 'route'" which is fixed by this patch.

[1]: https://groups.google.com/g/swupdate/c/rPGuMF0IiJw/m/gH7gMClzBQAJ?gl=BE
Stefano Babic May 8, 2024, 4:06 p.m. UTC | #2
On 08.05.24 08:31, Sam Van Den Berge wrote:
> On Fri, Apr 19, 2024 at 10:20:04AM +0200, sam.van.den.berge@gmail.com wrote:
>> From: Sam Van Den Berge <sam.van.den.berge@gmail.com>
>>
>> Fixes the following error:
>>
>> AttributeError: 'Namespace' object has no attribute 'route'
>>
>> Signed-off-by: Sam Van Den Berge <sam.van.den.berge@gmail.com>
>> ---
>>   tools/python/swupdateclient/swupdateclient/main.py | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/tools/python/swupdateclient/swupdateclient/main.py b/tools/python/swupdateclient/swupdateclient/main.py
>> index d4230a4..ab78a3d 100644
>> --- a/tools/python/swupdateclient/swupdateclient/main.py
>> +++ b/tools/python/swupdateclient/swupdateclient/main.py
>> @@ -224,7 +224,7 @@ def client(args: List[str]) -> None:
>>           args.swu_file,
>>           args.host_name,
>>           args.port,
>> -        args.route,
>> +        path=args.path,
>>           log_level=args.log_level.upper(),
>>       )
>>       updater.update(timeout=args.timeout)
>
> Small reminder to this patch since I noticed it hasn't been applied yet.  Maybe
> I should have been a bit more verbose in the commit message but this patch is
> in fact a fix for 386caee763f.
>
> The patch submitted on the mailing list added an additional argument named
> route but because of discussions on the mailing list [1], the route CLI
> argument was renamed to path. However it's usage more below in the file was not
> renamed and remained route, resulting in the error "AttributeError: 'Namespace'
> object has no attribute 'route'" which is fixed by this patch.
>
> [1]: https://groups.google.com/g/swupdate/c/rPGuMF0IiJw/m/gH7gMClzBQAJ?gl=BE
>

Ok, got it, applied.

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/tools/python/swupdateclient/swupdateclient/main.py b/tools/python/swupdateclient/swupdateclient/main.py
index d4230a4..ab78a3d 100644
--- a/tools/python/swupdateclient/swupdateclient/main.py
+++ b/tools/python/swupdateclient/swupdateclient/main.py
@@ -224,7 +224,7 @@  def client(args: List[str]) -> None:
         args.swu_file,
         args.host_name,
         args.port,
-        args.route,
+        path=args.path,
         log_level=args.log_level.upper(),
     )
     updater.update(timeout=args.timeout)