[MERGE][1.9] AttributeError: 'NoneType' object has no attribute 'write'
John Arbash Meinel
john at arbash-meinel.com
Sat Nov 1 14:48:10 GMT 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Asmodehn Shade wrote:
> ok apparently it s because by default sudo doesnt set the home of the
> targetted user...
>
> so if I do
> sudo -H -u autobzr sh -c "cd /home/autobzr/deployBZR/branch && bzr revno"
>
> it works fine...
> but then I wonder why it used to work in 1.8...
>
> Anyway problem solved ;-)
>
> Cheers,
>
> --
> Alex
>
So, I believe that is probably the same reason your username is failing
to be looked up. Because the "autobzr" user is unable to connect to
LDAP. And by saving the 'whoami' value in the bazaar config, it doesn't
try to do the lookup.
(The file is ~/.bazaar/bazaar.conf, though it sounds like you need to be
careful because some of the time you are using your personal settings
when running as the autobzr user.)
Anyway, this patch should fix your problem with "NoneType". I changed
how he log file open+setup code was working for 1.9, and didn't think
about this failure mode.
I also made it more explicit that _open_bzr_log() returns None when it
fails to open.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkkMbCoACgkQJdeBCYSNAANmFQCgg0b0dlHFtR/2Gi+xjrvTJ1sE
+wYAoKy1y/4584esFiJU5ORn0XsplnON
=iXtc
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: trace_none.patch
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20081101/96f12fdf/attachment.diff
More information about the bazaar
mailing list