]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix a couple of strings that were no-ops. urllib.open_file was a docstring
authorNeal Norwitz <nnorwitz@gmail.com>
Sun, 9 Apr 2006 04:00:49 +0000 (04:00 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Sun, 9 Apr 2006 04:00:49 +0000 (04:00 +0000)
in 2.4, so put it back.  The string in telnetlib looks like a comment.

Lib/telnetlib.py
Lib/urllib.py

index 8a2513b4ef49f8eeeebd2f68d77d31bd41675d9d..3523037edba42fe4297d4c1fb33a814ed49d1ead 100644 (file)
@@ -438,7 +438,7 @@ class Telnet:
                     else:
                         self.iacseq += c
                 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):
                         self.iacseq += c
                         continue
index d1c50f61920d01762f6b6d59d1511519172e32e6..c1f6f60bcea2addfb44246346384e49e0e434a2d 100644 (file)
@@ -442,9 +442,9 @@ class URLopener:
         return addinfourl(fp, noheaders(), "gopher:" + url)
 
     def open_file(self, url):
+        """Use local file or FTP depending on form of URL."""
         if not isinstance(url, str):
             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/':
             return self.open_ftp(url)
         else: