diff options
author | Walter Dörwald <walter@livinglogic.de> | 2002-09-11 20:36:02 (GMT) |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2002-09-11 20:36:02 (GMT) |
commit | aaab30e00cc3e8d90c71b8657c284feeb4ac1413 (patch) | |
tree | d055e0bd374770014d9afdff1b961418b1828584 /Tools/webchecker/websucker.py | |
parent | 6a0477b099560a452e37fe77c3850bf232487c16 (diff) | |
download | cpython-aaab30e00cc3e8d90c71b8657c284feeb4ac1413.zip cpython-aaab30e00cc3e8d90c71b8657c284feeb4ac1413.tar.gz cpython-aaab30e00cc3e8d90c71b8657c284feeb4ac1413.tar.bz2 |
Apply diff2.txt from SF patch http://www.python.org/sf/572113
(with one small bugfix in bgen/bgen/scantools.py)
This replaces string module functions with string methods
for the stuff in the Tools directory. Several uses of
string.letters etc. are still remaining.
Diffstat (limited to 'Tools/webchecker/websucker.py')
-rwxr-xr-x | Tools/webchecker/websucker.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Tools/webchecker/websucker.py b/Tools/webchecker/websucker.py index 5f726b3..ef2fa44 100755 --- a/Tools/webchecker/websucker.py +++ b/Tools/webchecker/websucker.py @@ -6,7 +6,6 @@ __version__ = "$Revision$" import os import sys -import string import urllib import getopt @@ -14,7 +13,7 @@ import webchecker # Extract real version number if necessary if __version__[0] == '$': - _v = string.split(__version__) + _v = __version__.split() if len(_v) == 3: __version__ = _v[1] @@ -90,14 +89,14 @@ class Sucker(webchecker.Checker): def savefilename(self, url): type, rest = urllib.splittype(url) host, path = urllib.splithost(rest) - while path[:1] == "/": path = path[1:] + path = path.lstrip("/") user, host = urllib.splituser(host) host, port = urllib.splitnport(host) - host = string.lower(host) + host = host.lower() if not path or path[-1] == "/": path = path + "index.html" if os.sep != "/": - path = string.join(string.split(path, "/"), os.sep) + path = os.sep.join(path.split("/")) if os.name == "mac": path = os.sep + path path = os.path.join(host, path) |