Author martin.panter
Recipients martin.panter
Date 2014-07-13.01:49:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
This isn’t a particularly important problem for me but when reading the code I noticed some bit rot in this function, where a host name in a “file:” URL would be handled differently than intended.

* The url[:2] == '//' check is probably wrong because it is comparing the URL’s path component (selector), not the prefix for a host name. Compare urlopen("file://host//") and urlopen("file://host/") error messages.

* The is self.get_names() should probably use “in”, not “is”. The code author presumably expected urlopen("file://") to work.

* Also it seems odd that urlopen("file://remote/missing") immediately reports “No such file”, while urlopen("file://remote/") blocks for a host name lookup and then reports “not on local host”.
Date User Action Args
2014-07-13 01:49:21martin.pantersetrecipients: + martin.panter
2014-07-13 01:49:21martin.pantersetmessageid: <>
2014-07-13 01:49:21martin.panterlinkissue21970 messages
2014-07-13 01:49:20martin.pantercreate