]> git.phdru.name Git - bookmarks_db.git/blobdiff - Robots/bkmk_rurllib_to.py
Merge bkmk_rurllib_to.py into bkmk_robot_base.py
[bookmarks_db.git] / Robots / bkmk_rurllib_to.py
diff --git a/Robots/bkmk_rurllib_to.py b/Robots/bkmk_rurllib_to.py
deleted file mode 100644 (file)
index 30ec08e..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-"""Simple robot with socket's timeout
-
-This file is a part of Bookmarks database and Internet robot.
-
-"""
-
-__author__ = "Oleg Broytman <phd@phdru.name>"
-__copyright__ = "Copyright (C) 2000-2014 PhiloSoft Design"
-__license__ = "GNU GPL"
-
-__all__ = ['robot_urllib_to']
-
-
-import socket
-from .bkmk_rurllib import robot_urllib, get_error
-
-
-class robot_urllib_to(robot_urllib):
-   timeout = 60
-
-   def __init__(self, *args, **kw):
-        robot_urllib.__init__(self, *args, **kw)
-        socket.setdefaulttimeout(int(self.timeout))
-
-   def check_url(self, bookmark):
-      try:
-         return robot_urllib.check_url(self, bookmark)
-      except socket.error, msg:
-         bookmark.error = get_error(msg)
-         self.log(bookmark.error)
-         return 1