Code review comment for lp:~milo/lava-tool/server-rpc-endpoint-fix

Revision history for this message
Milo Casagrande (milo) wrote :

On Thu, Aug 1, 2013 at 2:04 AM, Antonio Terceiro
<email address hidden> wrote:
> I don't understand why you need to parse the url just to unparse it a
> few lines below. This function seems rather pointless to me.

Because if somebody when prompted for the server URL enters just
"", withouth the scheme, we will get a rather unpleasant
"IOError: unsupported XML-RPC protocol" error.

So, I need to look into the given URL and make sure we have a scheme,
or default to HTTPS, and that the URL has a trailing slash (since
looks like lava-tool auth-add adds it by default when adding an auth
token). That's why I parse the URL first, check what's necessary, and
then unparse it to create back the full URL.

Milo Casagrande | Automation Engineer <> │ Open source software for ARM SoCs

« Back to merge proposal