Re: [Openstack] git-review change 3988

2012-02-09 Thread Monty Taylor
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
> 

___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


[Openstack] git-review change 3988

2012-02-09 Thread Pete Zaitcev
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

___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp