Fix a couple of strings that were no-ops. urllib.open_file was a docstring

in 2.4, so put it back.  The string in telnetlib looks like a comment.
This commit is contained in:
Neal Norwitz 2006-04-09 04:00:49 +00:00
parent a31bf18c48
commit c5d0dbd328
2 changed files with 2 additions and 2 deletions

View File

@ -438,7 +438,7 @@ class Telnet:
else: else:
self.iacseq += c self.iacseq += c
elif len(self.iacseq) == 1: elif len(self.iacseq) == 1:
'IAC: IAC CMD [OPTION only for WILL/WONT/DO/DONT]' # 'IAC: IAC CMD [OPTION only for WILL/WONT/DO/DONT]'
if c in (DO, DONT, WILL, WONT): if c in (DO, DONT, WILL, WONT):
self.iacseq += c self.iacseq += c
continue continue

View File

@ -442,9 +442,9 @@ class URLopener:
return addinfourl(fp, noheaders(), "gopher:" + url) return addinfourl(fp, noheaders(), "gopher:" + url)
def open_file(self, url): def open_file(self, url):
"""Use local file or FTP depending on form of URL."""
if not isinstance(url, str): if not isinstance(url, str):
raise IOError, ('file error', 'proxy support for file protocol currently not implemented') raise IOError, ('file error', 'proxy support for file protocol currently not implemented')
"""Use local file or FTP depending on form of URL."""
if url[:2] == '//' and url[2:3] != '/' and url[2:12].lower() != 'localhost/': if url[:2] == '//' and url[2:3] != '/' and url[2:12].lower() != 'localhost/':
return self.open_ftp(url) return self.open_ftp(url)
else: else: