#3060 kojivmd: py3 compatibility issues
Closed 3 years ago by tkopecek. Opened 3 years ago by tkopecek.
tkopecek/koji issue3059  into  master

file modified
+3 -3
@@ -746,7 +746,7 @@ 

          try:

              fileobj.seek(offset)

              data = fileobj.read(length)

-             encoded = base64.b64encode(data)

+             encoded = base64.b64encode(data).decode()

              del data

              return encoded

          finally:
@@ -1081,7 +1081,7 @@ 

                  self.cleanupVM(vm_name)

  

      def cleanupExpiredVMs(self):

-         for vm_name, task in self.expired_vms.items():

+         for vm_name, task in list(self.expired_vms.items()):

              if task['state'] == koji.TASK_STATES['FAILED']:

                  if time.time() - task['completion_ts'] < 3600 * 4:

                      # task failed, so we'll keep the VM image around for 4 hours
@@ -1097,7 +1097,7 @@ 

          self.macaddr_lock.acquire()

          try:

              if ret:

-                 for macaddr, (vm_name, id, port) in self.macaddrs.items():

+                 for macaddr, (vm_name, id, port) in list(self.macaddrs.items()):

                      if task_id == id:

                          self.expired_vms[vm_name] = self.session.getTaskInfo(task_id)

                          del self.macaddrs[macaddr]

Metadata Update from @tkopecek:
- Pull-request tagged with: no_qe

3 years ago

Ouch, pagure isse (when branch is deleted in src git, PR doesn't show anything) - merged ommit is here: https://pagure.io/koji/c/73399e5

Pull-Request has been closed by tkopecek

3 years ago
Metadata