]> git.phdru.name Git - bookmarks_db.git/blobdiff - Robots/bkmk_rforking.py
Chore: Explicitly open text files in text mode
[bookmarks_db.git] / Robots / bkmk_rforking.py
index e1281219c66974d70c1b8d538744638e99bfc315..117bf31913fba0b866217980ed58d85a04d56b97 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
@@ -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: