Explicit tuple in list constructor

This commit is contained in:
Tomas Kopecek 2017-06-05 13:54:46 +02:00
parent 1f6ca9ae72
commit 09651a9a8f

View file

@ -661,7 +661,7 @@ class BuildRoot(object):
repodir = pathinfo.repo(self.repo_info['id'], self.repo_info['tag_name'])
repomdpath = os.path.join(repodir, self.br_arch, 'repodata', 'repomd.xml')
opts = dict([(k, getattr(self.options, k)) for k in 'topurl','topdir'])
opts = dict([(k, getattr(self.options, k)) for k in ('topurl','topdir')])
opts['tempdir'] = self.options.workdir
fo = koji.openRemoteFile(repomdpath, **opts)
try:
@ -940,7 +940,7 @@ class BuildTask(BaseTaskHandler):
#srpm arg should be a path relative to <BASEDIR>/work
self.logger.debug("Reading SRPM")
relpath = "work/%s" % srpm
opts = dict([(k, getattr(self.options, k)) for k in 'topurl','topdir'])
opts = dict([(k, getattr(self.options, k)) for k in ('topurl','topdir')])
opts['tempdir'] = self.workdir
fo = koji.openRemoteFile(relpath, **opts)
h = koji.get_rpm_header(fo)
@ -3347,7 +3347,7 @@ class OzImageTask(BaseTaskHandler):
srcdir=scmsrcdir)
kspath = os.path.join(scmsrcdir, os.path.basename(ksfile))
else:
tops = dict([(k, getattr(self.options, k)) for k in 'topurl','topdir'])
tops = dict([(k, getattr(self.options, k)) for k in ('topurl','topdir')])
tops['tempdir'] = self.workdir
ks_src = koji.openRemoteFile(ksfile, **tops)
kspath = os.path.join(self.workdir, os.path.basename(ksfile))
@ -4160,7 +4160,7 @@ class BuildIndirectionImageTask(OzImageTask):
srcdir=scmsrcdir)
final_path = os.path.join(scmsrcdir, os.path.basename(filepath))
else:
tops = dict([(k, getattr(self.options, k)) for k in 'topurl','topdir'])
tops = dict([(k, getattr(self.options, k)) for k in ('topurl','topdir')])
tops['tempdir'] = self.workdir
remote_fileobj = koji.openRemoteFile(filepath, **tops)
final_path = os.path.join(self.workdir, os.path.basename(filepath))