From: Oleg Broytman Date: Thu, 27 Dec 2007 19:33:01 +0000 (+0000) Subject: Convert redirect timeout to int if possible. X-Git-Tag: v4.5.3~242 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=ed19085cc0b63b3a8021f3c97de1d1a72649b099;p=bookmarks_db.git Convert redirect timeout to int if possible. git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@134 fdd5c36f-1aea-0310-aeeb-c58d7e2b6c23 --- diff --git a/Robots/bkmk_rsimple.py b/Robots/bkmk_rsimple.py index 77c7a15..421d677 100644 --- a/Robots/bkmk_rsimple.py +++ b/Robots/bkmk_rsimple.py @@ -156,6 +156,10 @@ class robot_simple(Robot): except (IndexError, ValueError): raise RedirectException("html", "Bad redirect to %s (%s)" % (url, refresh)) else: + try: + timeout = int(refresh.split(';')[0]) + except ValueError: + pass # float timeout raise RedirectException("html", "%s (%s sec)" % (url, timeout)) # Get favicon.ico