1 """Simple robot with socket's timeout
3 This file is a part of Bookmarks database and Internet robot.
7 __author__ = "Oleg Broytman <phd@phdru.name>"
8 __copyright__ = "Copyright (C) 2000-2014 PhiloSoft Design"
9 __license__ = "GNU GPL"
11 __all__ = ['robot_urllib_to']
15 from .bkmk_rurllib import robot_urllib, get_error
18 class robot_urllib_to(robot_urllib):
21 def __init__(self, *args, **kw):
22 robot_urllib.__init__(self, *args, **kw)
23 socket.setdefaulttimeout(int(self.timeout))
25 def check_url(self, bookmark):
27 return robot_urllib.check_url(self, bookmark)
28 except socket.error, msg:
29 bookmark.error = get_error(msg)
30 self.log(bookmark.error)