]> git.phdru.name Git - bookmarks_db.git/blobdiff - Robots/bkmk_rforking.py
Fix(robots): Store charset
[bookmarks_db.git] / Robots / bkmk_rforking.py
index e1281219c66974d70c1b8d538744638e99bfc315..7b458df0ca8767cba61c3c1b76a3d8d5579b03f3 100644 (file)
@@ -24,7 +24,7 @@ from bkmk_objects import Robot
 
 # This is to catch 'close failed: [Errno 9] Bad file descriptor' message
 # from os.close() in Subprocess.die() and errors from the subprocess.
-sys.stderr = open("err.log", 'a')
+sys.stderr = open("err.log", 'at')
 
 check_subp = None
 subp_pipe = None
@@ -52,7 +52,7 @@ _set_subproc = True
 
 
 class robot_forking(Robot):
-    subproc = 'urllib2'  # Default subprocess
+    subproc = 'urllib'  # Default subprocess
 
     def check_url(self, bookmark):
         global _set_subproc
@@ -86,7 +86,7 @@ class robot_forking(Robot):
                     "error", "no_error",
                     "moved", "size", "md5", "real_title",
                     "last_tested", "last_modified", "test_time",
-                    "icon", "icon_href",
+                    "icon", "icon_href", "charset",
                 ):
                     if hasattr(new_b, attr):
                         setattr(bookmark, attr, getattr(new_b, attr))
@@ -100,7 +100,7 @@ class robot_forking(Robot):
                 error = check_subp.readPendingErrLine()
                 if not error:
                     break
-                sys.stderr.write("(subp) " + error)
+                sys.stderr.write("(subp) %s" % error)
             sys.stderr.flush()
 
         except KeyboardInterrupt: