update exception syntax in signed-repo code
This commit is contained in:
parent
e0826a3145
commit
1bfa815b16
3 changed files with 4 additions and 4 deletions
|
|
@ -5019,7 +5019,7 @@ class createSignedRepoTask(CreaterepoTask):
|
|||
#arch is the arch of the repo, not the task
|
||||
self.rinfo = self.session.repoInfo(repo_id, strict=True)
|
||||
if self.rinfo['state'] != koji.REPO_INIT:
|
||||
raise koji.GenericError, "Repo %(id)s not in INIT state (got %(state)s)" % self.rinfo
|
||||
raise koji.GenericError("Repo %(id)s not in INIT state (got %(state)s)" % self.rinfo)
|
||||
self.repo_id = self.rinfo['id']
|
||||
self.pathinfo = koji.PathInfo(self.options.topdir)
|
||||
groupdata = os.path.join(
|
||||
|
|
|
|||
|
|
@ -12334,7 +12334,7 @@ class HostExports(object):
|
|||
repodir = koji.pathinfo.signedrepo(repo_id, rinfo['tag_name'])
|
||||
archdir = "%s/%s" % (repodir, koji.canonArch(arch))
|
||||
if not os.path.isdir(archdir):
|
||||
raise koji.GenericError, "Repo arch directory missing: %s" % archdir
|
||||
raise koji.GenericError("Repo arch directory missing: %s" % archdir)
|
||||
datadir = "%s/repodata" % archdir
|
||||
koji.ensuredir(datadir)
|
||||
for fn in files:
|
||||
|
|
@ -12347,7 +12347,7 @@ class HostExports(object):
|
|||
else:
|
||||
dst = "%s/%s" % (datadir, fn)
|
||||
if not os.path.exists(src):
|
||||
raise koji.GenericError, "uploaded file missing: %s" % src
|
||||
raise koji.GenericError("uploaded file missing: %s" % src)
|
||||
if fn.endswith('pkglist'):
|
||||
# hardlink the found rpms into the final repodir
|
||||
# TODO: properly consider split-volume functionality
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ class TestSignedRepoMove(unittest.TestCase):
|
|||
path = os.path.join(repodir, relpath)
|
||||
basename = os.path.basename(path)
|
||||
if not os.path.exists(path):
|
||||
raise Exception, "Missing file: %s" % path
|
||||
raise Exception("Missing file: %s" % path)
|
||||
data = open(path).read()
|
||||
data.strip()
|
||||
self.assertEquals(data, basename)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue