Review: Needs Fixing
Diff comments:
> diff --git a/src/maascli/api.py b/src/maascli/api.py
> index 7196977..1a4c14c 100644
> --- a/src/maascli/api.py
> +++ b/src/maascli/api.py
> @@ -49,10 +49,11 @@ def http_request(
> if isinstance(url, bytes):
> url = url.decode("ascii")
> return http.request(url, method, body=body, headers=headers)
> - except httplib2.ssl.SSLError:
> + except httplib2.ssl.SSLError as error:
> raise CommandError(
> "Certificate verification failed, use --insecure/-k to "
> "disable the certificate check."
> + f"{getattr(error, 'reason', '')}"
doesn't need to be getattr() SSLErrors always have a reason
please add unit test coverage of this too
> )
>
>
--
https://code.launchpad.net/~troyanov/maas/+git/maas/+merge/439110
Your team MAAS Committers is subscribed to branch maas:master.
--
Mailing list: https://launchpad.net/~sts-sponsors
Post to : [email protected]
Unsubscribe : https://launchpad.net/~sts-sponsors
More help : https://help.launchpad.net/ListHelp