From: Oleg Broytman Date: Fri, 28 Dec 2007 20:08:03 +0000 (+0000) Subject: Removed timeoutsocket - the timeout functionality has been implemented in socket... X-Git-Tag: v4.5.3~230 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=a334a6e43f36642f4ffff7ebf0aec085a8545b2f;p=bookmarks_db.git Removed timeoutsocket - the timeout functionality has been implemented in socket module. git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@146 fdd5c36f-1aea-0310-aeeb-c58d7e2b6c23 --- diff --git a/Robots/bkmk_rsimple_tos.py b/Robots/bkmk_rsimple_tos.py index 4f8588a..4d47073 100644 --- a/Robots/bkmk_rsimple_tos.py +++ b/Robots/bkmk_rsimple_tos.py @@ -1,23 +1,21 @@ """ - Simple robot with timeoutsocket + Simple robot with socket's timeout Written by BroytMann. 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): try: return robot_simple.check_url(self, bookmark) - - except (socket.error, timeoutsocket.Timeout), msg: + except socket.error, msg: bookmark.error = get_error(msg) self.finish_check_url(bookmark) - return 1