]> git.phdru.name Git - bookmarks_db.git/blobdiff - Robots/bkmk_rsimple_tos.py
Moved parse_html.py and its submodules to a separate parse_html module.
[bookmarks_db.git] / Robots / bkmk_rsimple_tos.py
index cecb515bfa87e7ff0a034bdee8451619802a0672..ad42f09a73077370e68bcd1accf076d6230a78e5 100644 (file)
@@ -1,23 +1,22 @@
 """
-   Simple robot with timeoutsocket
+   Simple robot with socket's timeout
 
-   Written by BroytMann. Copyright (C) 2000-2003 PhiloSoft Design
+   Written by Broytman. Copyright (C) 2000-2011 PhiloSoft Design
 """
 
+import socket
+socket.setdefaulttimeout(900)
 
-import socket, timeoutsocket
-timeoutsocket.setDefaultSocketTimeout(900)
+from .bkmk_rsimple import robot_simple, get_error
 
-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.log(bookmark.error)
 
       self.finish_check_url(bookmark)
-
       return 1