]> git.phdru.name Git - bookmarks_db.git/commitdiff
Convert redirect timeout to int if possible.
authorOleg Broytman <phd@phdru.name>
Thu, 27 Dec 2007 19:33:01 +0000 (19:33 +0000)
committerOleg Broytman <phd@phdru.name>
Thu, 27 Dec 2007 19:33:01 +0000 (19:33 +0000)
git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@134 fdd5c36f-1aea-0310-aeeb-c58d7e2b6c23

Robots/bkmk_rsimple.py

index 77c7a150109509583c2eb3d5fb5f538d45806283..421d677530d88fefa0239e2aa388db70533517b2 100644 (file)
@@ -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