X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=Robots%2Fbkmk_rurllib.py;h=00a4a42b1824ce9fe37dc6cb2f9761cb65e7f3e5;hb=aaa16e28a73fcc01ff9fa5709c72970bb50629d7;hp=1b3182ea04de146e44fe0ac219599a30517ca34e;hpb=05f0cc396bc24da45fa1a8b0a79c97c79f399465;p=bookmarks_db.git diff --git a/Robots/bkmk_rurllib.py b/Robots/bkmk_rurllib.py index 1b3182e..00a4a42 100644 --- a/Robots/bkmk_rurllib.py +++ b/Robots/bkmk_rurllib.py @@ -27,9 +27,9 @@ class RedirectException(Exception): class MyURLopener(urllib.URLopener): # Error 301 -- relocated (permanently) def http_error_301(self, url, fp, errcode, errmsg, headers, data=None): - if headers.has_key('location'): + if 'location' in headers: newurl = headers['location'] - elif headers.has_key('uri'): + elif 'uri' in headers: newurl = headers['uri'] else: newurl = "Nowhere"