]> git.phdru.name Git - bookmarks_db.git/blobdiff - Robots/bkmk_rsimple_tos.py
2010.
[bookmarks_db.git] / Robots / bkmk_rsimple_tos.py
index 581fb6988e54b0b1f7703c13343550d7ee5fe56a..6e032152e58d48169ece4c63925e0f890bc7dfcd 100644 (file)
@@ -1,24 +1,21 @@
-#! /usr/local/bin/python -O
 """
-   Simpl robot with timeoutsocket
+   Simple robot with socket's timeout
 
-   Written by BroytMann, Sep 2000. Copyright (C) 2000 PhiloSoft Design
+   Written by Broytman. Copyright (C) 2000-2007 PhiloSoft Design
 """
 
-
-import socket, timeoutsocket
-timeoutsocket.setDefaultSocketTimeout(900)
+import socket
+socket.setdefaulttimeout(900)
 
 from bkmk_rsimple import robot_simple, get_error
 
+
 class robot_simple_tos(robot_simple):
-   def check_url(self, bookmark, url_type, url_rest):
+   def check_url(self, bookmark):
       try:
-         return robot_simple.check_url(self, bookmark, url_type, url_rest)
-
-      except (socket.error, timeoutsocket.Timeout), msg:
+         return robot_simple.check_url(self, bookmark)
+      except socket.error, msg:
          bookmark.error = get_error(msg)
 
       self.finish_check_url(bookmark)
-
       return 1