diff options
Diffstat (limited to 'Tools/scripts/ftpmirror.py')
-rwxr-xr-x | Tools/scripts/ftpmirror.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Tools/scripts/ftpmirror.py b/Tools/scripts/ftpmirror.py index 38af9dc..c3469d0 100755 --- a/Tools/scripts/ftpmirror.py +++ b/Tools/scripts/ftpmirror.py @@ -22,7 +22,6 @@ import os import sys import time import getopt -import string import ftplib import netrc from fnmatch import fnmatch @@ -127,7 +126,7 @@ def mirrorsubdir(f, localdir): if mac: # Mac listing has just filenames; # trailing / means subdirectory - filename = string.strip(line) + filename = line.strip() mode = '-' if filename[-1:] == '/': filename = filename[:-1] @@ -135,12 +134,12 @@ def mirrorsubdir(f, localdir): infostuff = '' else: # Parse, assuming a UNIX listing - words = string.split(line, None, 8) + words = line.split(None, 8) if len(words) < 6: if verbose > 1: print 'Skipping short line' continue - filename = string.lstrip(words[-1]) - i = string.find(filename, " -> ") + filename = words[-1].lstrip() + i = filename.find(" -> ") if i >= 0: # words[0] had better start with 'l'... if verbose > 1: @@ -360,7 +359,7 @@ class LoggingFile: def askabout(filetype, filename, pwd): prompt = 'Retrieve %s %s from %s ? [ny] ' % (filetype, filename, pwd) while 1: - reply = string.lower(string.strip(raw_input(prompt))) + reply = raw_input(prompt).strip().lower() if reply in ['y', 'ye', 'yes']: return 1 if reply in ['', 'n', 'no', 'nop', 'nope']: |