From ed19085cc0b63b3a8021f3c97de1d1a72649b099 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Thu, 27 Dec 2007 19:33:01 +0000 Subject: [PATCH] Convert redirect timeout to int if possible. git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@134 fdd5c36f-1aea-0310-aeeb-c58d7e2b6c23 --- Robots/bkmk_rsimple.py | 4 ++++ 1 file changed, 4 insertions(+) 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 -- 2.39.5