]> git.phdru.name Git - bookmarks_db.git/blobdiff - Robots/bkmk_rsimple.py
I have changed htdocs location again.
[bookmarks_db.git] / Robots / bkmk_rsimple.py
index 0d6c04409756be02fa161257b71729b68c2bd740..2a18beb72edad934fa1120c1f9e9fb3035130c75 100644 (file)
@@ -143,15 +143,18 @@ class robot_simple(Robot):
                      if self.log: self.log("   final title    : %s" % bookmark.real_title)
                      if parser.refresh:
                         refresh = parser.refresh
-                        try:
-                           timeout = int(refresh.split(';')[0])
-                        except (IndexError, ValueError):
-                           timeout = "ERROR"
                         try:
                            url = refresh.split('=', 1)[1]
                         except IndexError:
                            url = "self"
-                        raise RedirectException("html", "%s (%d sec)" % (url, timeout))
+                        try:
+                           timeout = int(refresh.split(';')[0])
+                        except (IndexError, ValueError):
+                           timeout = None
+                        if timeout is None:
+                           raise RedirectException("html", "Bad redirect to %s (%s)" % (url, refresh))
+                        else:
+                           raise RedirectException("html", "%s (%d sec)" % (url, timeout))
                except KeyError:
                   pass