]> git.phdru.name Git - bookmarks_db.git/commitdiff
Rename urlretrieve to get
authorOleg Broytman <phd@phdru.name>
Fri, 4 Jul 2014 20:11:43 +0000 (00:11 +0400)
committerOleg Broytman <phd@phdru.name>
Fri, 4 Jul 2014 20:11:43 +0000 (00:11 +0400)
Robots/bkmk_robot_base.py
Robots/bkmk_rurllib.py

index 6226328388c78e75e4cedf90604760a84517be40..057fceff7d7370c1cff4a34957118f42ee955665 100644 (file)
@@ -61,7 +61,7 @@ class robot_base(Robot):
          url_path, url_tag  = urllib.splittag(url_path)
 
          url = "%s://%s%s" % (url_type, url_host, url_path)
-         headers, content, error = self.urlretrieve(bookmark, url, True)
+         headers, content, error = self.get(bookmark, url, True)
 
          if error:
              bookmark.error = error
@@ -145,7 +145,7 @@ class robot_base(Robot):
                         _icon_url = icon_url
                         for i in range(8):
                            try:
-                              icon_headers, icon_data, error = self.urlretrieve(bookmark, _icon_url)
+                              icon_headers, icon_data, error = self.get(bookmark, _icon_url)
                            except RedirectException, e:
                               _icon_url = e.url
                               self.log("   redirect to : %s" % _icon_url)
index ceaf67bd7218f5eb2b90203d2fdb0257d3b582e3..839e37316197d10a51b8812e5bca874e7f00738f 100644 (file)
@@ -74,7 +74,7 @@ urllib.ftpwrapper = myftpwrapper
 
 
 class robot_urllib(robot_base):
-   def urlretrieve(self, bookmark, url, accept_charset=False):
+   def get(self, bookmark, url, accept_charset=False):
       try:
          # Set fake referer to the base URL
          urllib._urlopener.addheaders[2] = ('Referer', url)