]> TLD Linux GIT Repositories - tld-builder.git/commitdiff
- more python 3.x fixes
authorMarcin Krol <hawk@tld-linux.org>
Mon, 22 Mar 2021 19:36:08 +0000 (20:36 +0100)
committerMarcin Krol <hawk@tld-linux.org>
Mon, 22 Mar 2021 19:36:08 +0000 (20:36 +0100)
TLD_Builder/bqueue.py
TLD_Builder/install.py
TLD_Builder/mailer.py
TLD_Builder/notify.py
TLD_Builder/pipeutil.py
TLD_Builder/request_fetcher.py
TLD_Builder/wrap.py

index eab166d18c1dfdb9ce6c47cf6a0f7e281a32cad9..d5b183f8c8aac24fb85662c5af38012103380f7e 100644 (file)
@@ -128,7 +128,7 @@ class B_Queue:
         fcntl.flock(self.fd, fcntl.LOCK_UN)
 
     def write_signed(self, name):
-        sio = StringIO.StringIO()
+        sio = StringIO()
         self._write_to(sio)
         sio.seek(0)
         sio.write(gpg.sign(sio.read()))
index 02cdfd739f18d958b12ee081ed5fde5f0207dd94..d8badcc2700accf4ef094b33f8782684f28eb89d 100644 (file)
@@ -79,7 +79,7 @@ def upgrade_from_batch(r, b):
             b.log_line("upgrade would need removal of %s" % k)
             return False
     b.log_line("upgrading packages")
-    logbuf = StringIO.StringIO()
+    logbuf = StringIO()
     res = chroot.run("rpm -Fvh %s" % ' '.join(b.files), user = "root", logfile = b.logfile)
     if res != 0:
         b.log_line("package upgrade failed")
index 5ccf63a0d3c00628ee6c974e8291aa0541a1dff5..a0e1bb568d69a9250057837f2b62b6f335891ae7 100644 (file)
@@ -21,7 +21,7 @@ def recode(s):
 class Message:
     def __init__(self):
         self.headers = {}
-        self.body = StringIO.StringIO()
+        self.body = StringIO()
         self.set_std_headers()
 
     def set_header(self, n, v):
index ed5df8b432346997c8f960fffe44967ac39d8d87..e13c05235f2ba80a6d05be69ba2a8d681ded61aa 100644 (file)
@@ -14,12 +14,12 @@ from config import config
 
 class Notifier:
     def __init__(self, g):
-        self.xml = StringIO.StringIO()
+        self.xml = StringIO()
         self.xml.write("<notification group-id='%s' builder='%s'>\n" % \
                         (g.id, config.builder))
 
     def send(self, r):
-        sio = StringIO.StringIO()
+        sio = StringIO()
         self.xml.write("</notification>\n")
         self.xml.seek(0)
         sio.write(gpg.sign(self.xml.read()))
index 9a3ca23cf2f927daae4128aacccf1ba78d07d318..a3e78c9a1d7be8ff7b819a12d58c43c0ea5fdbe2 100644 (file)
@@ -9,9 +9,9 @@ else:
     from io import StringIO
 
 def rw_pipe(buf_, infd, outfd):
-    buf = StringIO.StringIO()
+    buf = StringIO()
     buf.write(buf_.read())
-    ret = StringIO.StringIO()
+    ret = StringIO()
     pos = 0
     rd_fin = 0
     wr_fin = 0
index 609ec711bcf644425bc247a671e6df4a45e44339..fc9f49dac3c21a26719070d4af7d39dd9b97f604 100644 (file)
@@ -73,7 +73,7 @@ def fetch_queue(control_url):
         signal.alarm(0)
         log.error("can't fetch %s: %s" % (control_url + "/queue.gz", e))
         sys.exit(1)
-    sio = StringIO.StringIO()
+    sio = StringIO()
     util.sendfile(f, sio)
     f.close()
     sio.seek(0)
index 9f62992dcfad4c3e6806bf8409cd475cda196dae..3d7c4a8867013fa2f90b51bf05447a569dfa68a1 100644 (file)
@@ -48,7 +48,7 @@ def wrap(main):
         exctype, value = sys.exc_info()[:2]
         if exctype == SystemExit:
             sys.exit(value)
-        s = StringIO.StringIO()
+        s = StringIO()
         traceback.print_exc(file = s, limit = 20)
 
         log.alert("fatal python exception")