fix merge problems

This commit is contained in:
Tomas Kopecek 2020-10-06 15:08:57 +02:00
parent 0c833c1236
commit 5a4efd6d07
5 changed files with 9 additions and 8 deletions

View file

@ -1,7 +1,5 @@
from __future__ import absolute_import
import sys
from setuptools import setup

View file

@ -4,6 +4,10 @@ envlist = flake8,py2,py3
[testenv:flake8]
deps =
flake8
# On EL6, pip would get us a flake8 that doesn't work with python2.6. The next
# two lines let us use an RPM-based version from EPEL if it is installed
sitepackages = true
whitelist_externals = flake8
# These two lines just speed things up by avoiding unnecessary setup
skip_install=true
usedevelop=true

View file

@ -467,7 +467,7 @@ def handle_trash():
mcall = koji.MultiCallSession(session, batch=1000)
for binfo in continuing:
mcall.buildReferences(binfo['id'], limit=10, lazy=True)
for binfo, [refs] in zip(continuing, mcall.call_all():
for binfo, [refs] in zip(continuing, mcall.call_all()):
i += 1
nvr = binfo['nvr']
# XXX - this is more data than we need
@ -651,7 +651,7 @@ def handle_delete(just_salvage=False):
mcall = koji.MultiCallSession(session, batch=1000)
for nvr, binfo in trash:
mcall.listTags(build=binfo['id'], perms=False)
for (nvr, binfo), [tags] in zip(trash, mcall.call_all():
for (nvr, binfo), [tags] in zip(trash, mcall.call_all()):
# see if build has been tagged elsewhere
tags = [t['name'] for t in tags if t['name'] != trashcan_tag]
if tags:
@ -709,7 +709,7 @@ def handle_delete(just_salvage=False):
mcall.untagBuildBypass(trashcan_tag, binfo['id'])
mcall.deleteBuild(binfo['id'])
for binfo, result in zip(continuing, mcall.call_all():
for binfo, result in zip(continuing, mcall.call_all()):
if isinstance(result, dict):
print("Warning: deletion failed: %s" % result['faultString'])
# TODO - log details for delete failures

View file

@ -34,7 +34,6 @@ import string
import sys
import time
import urllib2
import xmlrpc.client # for Fault
import requests
import rpm

View file

@ -262,8 +262,8 @@ class DaemonXMLRPCServer(xmlrpc.server.SimpleXMLRPCServer):
logRequests=False)
else:
xmlrpc.server.SimpleXMLRPCServer.__init__(self, (addr, port),
logRequests=False,
allow_none=True)
logRequests=False,
allow_none=True)
self.logger = logging.getLogger('koji.vm.DaemonXMLRPCServer')
self.socket.settimeout(5)
self.active = True