question about lp access to bzr+ssh and empty/wrong password

John Arbash Meinel john at arbash-meinel.com
Thu Feb 5 20:06:58 GMT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alexander Belchenko wrote:
...

>> Other than that, my guess is that the command-line UI returns either
>> None/'' for the password prompt, and your GUI is returning the opposite one.
>>
>> Looking at SilentUIFactory, it always returns "None" as the password,
>> however the CLIUIFactory uses 'get_non_echoed_password' which in turn
>> uses 'getpass.getpass()'.
>>
>> And when I hit <enter> there, I get back the empty string. So my guess
>> is that qbzr is returning None.
> 
> We send password via stin/stdout pipe as bencoded object, I don't think we can
> bencode None properly.
> 
> Thanks anyway.

Well, I see this in qbzr's lib/uifactory.py:

def get_password(self, prompt='', **kwargs):
    password, ok = QtGui.QInputDialog.getText(self.current_widget(),
                                              gettext("Enter Password"),
                                              (prompt % kwargs),
                                              QtGui.QLineEdit.Password)

    if ok:
        return str(password)
    else:
        raise KeyboardInterrupt()

I don't think things would be trapping the KeyboardInterrupt, which
means that you are again raising an exception, which has to propagate up
the stack, which ends up triggering a "try/finally:unlock()" code path,
which is then aborting because the connection is already closed, so we
aren't actually able to send the unlock() request.

Then again, we shouldn't be trying to send anything to the request,
since we haven't actually connected yet. Regardless, I think there is
some cleanup step that thinks it has finished connecting, and is trying
to 'close()' in a rational manner, which then is triggering the "you
can't send any more messages because there is no channel to write to"
(in this case, because there never *was* a channel).

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmLRuIACgkQJdeBCYSNAAOyLACfSIxu1A0xI9OKY8xjbXp2Uwc3
t7gAni3uGFAhFJBm+JZUoKuWIeO+w8VP
=23Fc
-----END PGP SIGNATURE-----



More information about the bazaar mailing list