]> git.phdru.name Git - bookmarks_db.git/blobdiff - Robots/bkmk_rurllib.py
Feat(Python3): `raise Error, value` -> `raise Error(value)`
[bookmarks_db.git] / Robots / bkmk_rurllib.py
index e0d5c2cba9cfdfae19d56a72057da8cd3c0867f5..b41722fade3af41f245429e11689c3ffae55bb58 100644 (file)
@@ -5,7 +5,7 @@ This file is a part of Bookmarks database and Internet robot.
 """
 
 __author__ = "Oleg Broytman <phd@phdru.name>"
-__copyright__ = "Copyright (C) 2000-2014 PhiloSoft Design"
+__copyright__ = "Copyright (C) 2000-2017 PhiloSoft Design"
 __license__ = "GNU GPL"
 
 __all__ = ['robot_urllib']
@@ -42,13 +42,13 @@ class MyURLopener(urllib.URLopener):
 
    # Error 401 -- authentication required
    def http_error_401(self, url, fp, errcode, errmsg, headers, data=None): 
-      raise IOError, ('http error', errcode, "Authentication required ", headers)
+      raise IOError(('http error', errcode, "Authentication required ", headers))
 
    def http_error_default(self, url, fp, errcode, errmsg, headers):
       if fp:
          void = fp.read()
          fp.close()
-      raise IOError, ('http error', errcode, errmsg, headers)
+      raise IOError(('http error', errcode, errmsg, headers))
 
 
 urllib._urlopener = MyURLopener()