]> git.phdru.name Git - bookmarks_db.git/blob - Robots/bkmk_rsimple_tos.py
0be22b843f421c5bd58505ce42bea75c3df4f4b3
[bookmarks_db.git] / Robots / bkmk_rsimple_tos.py
1 """
2    Simple robot with socket's timeout
3
4    Written by Broytman. Copyright (C) 2000-2010 PhiloSoft Design
5 """
6
7 import socket
8 socket.setdefaulttimeout(900)
9
10 from bkmk_rsimple import robot_simple, get_error
11
12
13 class robot_simple_tos(robot_simple):
14    def check_url(self, bookmark):
15       try:
16          return robot_simple.check_url(self, bookmark)
17       except socket.error, msg:
18          bookmark.error = get_error(msg)
19          self.log(bookmark.error)
20
21       self.finish_check_url(bookmark)
22       return 1