[Openstack] git-review change 3988

Monty Taylor mordred at inaugust.com
Fri Feb 10 03:23:01 UTC 2012


Yup. Absolutely crazy.

This was in the direction of solving an issue on OSX. Of course, I don't
have that, so I'm pretty sure I applied the theory poorly.

I will make a new patch and make a test case that I can use to prove the
problem and the solution.

Thank you.

On 02/09/2012 07:16 PM, Pete Zaitcev wrote:
> Guys,
> 
> Am I going mad? Can't see what's going on. The resulting code after commit
> looks is this (copy-pasted precisely):
> 
>     # Workaround bug in urlparse on OSX
>     if parsed_url.scheme == "ssh" and hostname[:2] == "//":
>         hostname = hostname[2:].split("/")[0]
>     # Workaround bug in urlparse on OSX
>     elif parsed_url.scheme == "ssh" and hostname[:2] == "//":
>         hostname = hostname[2:].split("/")[0]
> 
> How is this supposed to work? The conditions looks absolutely identical!
> Therefore
> 
>     if A:
>        foo
>     elif A:
>        foo
> 
> How could elif evaluate to true and the second foo run?
> 
> -- P
> 




More information about the Openstack mailing list