[MERGE] GSSAPI authentication support for FTP
John Arbash Meinel
john at arbash-meinel.com
Thu Aug 28 17:34:15 BST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jelmer Vernooij wrote:
> Thanks for reviewing.
>
...
>> Also, if the response was "3344" this would hit. Is it better to do:
>> resp[:4] == '334 '
>>
>> Regardless, the better thing to do (python wise) is:
>>
>> if resp.startswith('334'):
>>
>> I think you should generally switch things to:
>>
>> if resp.startswith('SOME STRING'), you have a lot of places that are
>> hard to maintain if a string changes size slightly. And they all should
>> have at least a little bit of documentation as to what is going on. Like
>> # 235 server wants more FOO
> The reason I used resp[:3] is because that is what is used in ftplib
> everywhere. I'd prefer to stay consistent with that, unless you insist.
I feel like ftplib is kind of crufty, and we should be using better programing
techniques in our code. I would imagine it was written in python <= 1.5.2 and
never updated. So I would *highly recommend* but I don't strictly require.
BB:tweak
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIttOGJdeBCYSNAAMRAi1/AKCDDcEYLD6ElFhLFGBFr/f9HTsFuQCfThr+
7XPa5cU8VUwvRqz93ZDEw3w=
=ks+M
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list