]> git.phdru.name Git - bookmarks_db.git/blob - Robots/bkmk_rsimple_tos.py
Version 3.3.1.
[bookmarks_db.git] / Robots / bkmk_rsimple_tos.py
1 #! /usr/local/bin/python -O
2 """
3    Simpl robot with timeoutsocket
4
5    Written by BroytMann, Sep 2000. Copyright (C) 2000 PhiloSoft Design
6 """
7
8
9 import socket, timeoutsocket
10 timeoutsocket.setDefaultSocketTimeout(900)
11
12 from bkmk_rsimple import robot_simple, get_error
13
14 class robot_simple_tos(robot_simple):
15    def check_url(self, bookmark, url_type, url_rest):
16       try:
17          return robot_simple.check_url(self, bookmark, url_type, url_rest)
18
19       except (socket.error, timeoutsocket.Timeout), msg:
20          bookmark.error = get_error(msg)
21
22       self.finish_check_url(bookmark)
23
24       return 1