From: Oleg Broytman Date: Sat, 29 Dec 2007 19:52:36 +0000 (+0000) Subject: Removed module 'string'. X-Git-Tag: v4.5.3~228 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=5ec101e58df6499cf2fe7ee38ead9e5a31cb59eb;p=bookmarks_db.git Removed module 'string'. git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@148 fdd5c36f-1aea-0310-aeeb-c58d7e2b6c23 --- diff --git a/Robots/bkmk_rsimple.py b/Robots/bkmk_rsimple.py index 47c2c7b..14a3f58 100644 --- a/Robots/bkmk_rsimple.py +++ b/Robots/bkmk_rsimple.py @@ -5,7 +5,7 @@ """ -import sys, os, string +import sys, os import time, urllib from base64 import b64encode from urlparse import urljoin @@ -61,14 +61,14 @@ urllib._urlopener.addheader('Referer', 'http://www.yahoo.com/') def get_error(msg): - if type(msg) == type(""): + if isinstance(msg, str): return msg else: s = [] for i in msg: - s.append("'%s'" % string.join(string.split(str(i), "\n"), "\\n")) - return "(%s)" % string.join(s) + s.append("'%s'" % str(i).replace('\n', "\\n")) + return "(%s)" % ' '.join(s) urllib_ftpwrapper = urllib.ftpwrapper @@ -78,7 +78,7 @@ class myftpwrapper(urllib_ftpwrapper): def __init__(self, user, passwd, host, port, dirs): urllib_ftpwrapper.__init__(self, user, passwd, host, port, dirs) global ftpcache_key - ftpcache_key = (user, host, port, string.join(dirs, '/')) + ftpcache_key = (user, host, port, tuple(dirs)) urllib.ftpwrapper = myftpwrapper