| |
@@ -84,7 +84,7 @@
|
| |
if dist not in ("FedoraRespin", "Fedora"):
|
| |
raise fedfind.exceptions.UnsupportedComposeError(
|
| |
"get_release(): fedfind does not support composes "
|
| |
- "like {0} as they contain no images".format(cid))
|
| |
+ "like {} as they contain no images".format(cid))
|
| |
|
| |
# Atomic stable nightly composes, 'Fedora-Atomic' shortname
|
| |
if dist == 'Fedora-Atomic':
|
| |
@@ -130,7 +130,7 @@
|
| |
return (dist, release, '', '', 0)
|
| |
return (dist, release, 'Production', date, int(respin))
|
| |
else:
|
| |
- raise ValueError("get_release(): could not parse compose ID {0}!".format(cid))
|
| |
+ raise ValueError("get_release(): could not parse compose ID {}!".format(cid))
|
| |
|
| |
def _parse_url(url):
|
| |
"""Handle a URL if specified. If this looks like the URL for
|
| |
@@ -230,7 +230,7 @@
|
| |
# Pungi 4
|
| |
# if int(release) > 23:
|
| |
# return Pungi4Mirror(
|
| |
- # '/fedora/linux/releases/{0}'.format(str(release)))
|
| |
+ # '/fedora/linux/releases/{}'.format(str(release)))
|
| |
|
| |
if int(release) < 7:
|
| |
return CoreRelease(release)
|
| |
@@ -392,7 +392,7 @@
|
| |
else:
|
| |
# this should very rarely happen, but we can't reasonably
|
| |
# know what to do if it does
|
| |
- raise ValueError('get_release: {0} as dist and {1} as milestone are ambiguous! Cannot '
|
| |
+ raise ValueError('get_release: {} as dist and {} as milestone are ambiguous! Cannot '
|
| |
'be sure what was meant.'.format(dist, milestone))
|
| |
return (dist, milestone)
|
| |
|
| |
@@ -581,7 +581,7 @@
|
| |
if url.startswith(fedfind.const.KNOWN_PREFIXES):
|
| |
return Pungi4Release(url)
|
| |
else:
|
| |
- raise ValueError("Unexpected URL {0}, expected to start with one of {1}".format(
|
| |
+ raise ValueError("Unexpected URL {}, expected to start with one of {}".format(
|
| |
url, ' '.join(fedfind.const.KNOWN_PREFIXES)))
|
| |
elif cid:
|
| |
(dist, release, milestone, compose, respin) = _parse_cid(cid)
|
| |
@@ -667,7 +667,7 @@
|
| |
# Production - the location for the compose on the unmirrored
|
| |
# kojipkgs server
|
| |
if not label:
|
| |
- label = "{0}-{1}.{2}".format(milestone, compose, respin)
|
| |
+ label = "{}-{}.{}".format(milestone, compose, respin)
|
| |
if not cid:
|
| |
# We may actually have a compose ID already on one path:
|
| |
# if the user called us with a compose ID and promote=True
|
| |
@@ -678,8 +678,8 @@
|
| |
(dist, release, milestone, compose, respin) = _parse_cid(cid)
|
| |
return Production(release, compose, respin)
|
| |
else:
|
| |
- raise ValueError("get_release(): could not find release for {0}, "
|
| |
- "{1}, {2}".format(release, milestone, compose))
|
| |
+ raise ValueError("get_release(): could not find release for {}, "
|
| |
+ "{}, {}".format(release, milestone, compose))
|
| |
|
| |
# At this point we've handled all composes that we can. If compose
|
| |
# is still set, this has to be an error.
|
| |
@@ -706,12 +706,12 @@
|
| |
self.compose = str(compose).upper()
|
| |
self.version = self.release
|
| |
if self.milestone:
|
| |
- self.version += ' {0}'.format(self.milestone)
|
| |
+ self.version += ' {}'.format(self.milestone)
|
| |
if self.compose:
|
| |
- self.version += ' {0}'.format(self.compose)
|
| |
+ self.version += ' {}'.format(self.compose)
|
| |
try:
|
| |
if self.respin:
|
| |
- self.version += '.{0}'.format(self.respin)
|
| |
+ self.version += '.{}'.format(self.respin)
|
| |
except AttributeError:
|
| |
# some classes have no respin
|
| |
pass
|
| |
@@ -720,11 +720,11 @@
|
| |
self.dist = "Fedora"
|
| |
|
| |
def __repr__(self):
|
| |
- return "{0}(release='{1}', milestone='{2}', compose='{3}')".format(
|
| |
+ return "{}(release='{}', milestone='{}', compose='{}')".format(
|
| |
self.__class__, self.release, self.milestone, self.compose)
|
| |
|
| |
def __str__(self):
|
| |
- return "{0} {1}".format(self.__class__.__name__, self.version)
|
| |
+ return "{} {}".format(self.__class__.__name__, self.version)
|
| |
|
| |
@abc.abstractproperty
|
| |
def previous_release(self):
|
| |
@@ -864,9 +864,9 @@
|
| |
# add a URL key (save consumers having to do this
|
| |
# work themselves)
|
| |
if imgdict.get('alt', False):
|
| |
- imgdict['url'] = "{0}/{1}".format(self.alt_location, imgdict['path'])
|
| |
+ imgdict['url'] = "{}/{}".format(self.alt_location, imgdict['path'])
|
| |
else:
|
| |
- imgdict['url'] = "{0}/{1}".format(self.location, imgdict['path'])
|
| |
+ imgdict['url'] = "{}/{}".format(self.location, imgdict['path'])
|
| |
# add a direct_url key, again for consumer ease
|
| |
if imgdict['url'].startswith(fedfind.const.HTTPS):
|
| |
imgdict['direct_url'] = imgdict['url'].replace(
|
| |
@@ -940,16 +940,16 @@
|
| |
if self._relnum < 17:
|
| |
split = False
|
| |
if self._relnum > 23:
|
| |
- url = '{0}/{1}/source/tree/Packages/'.format(self.location, tree)
|
| |
+ url = '{}/{}/source/tree/Packages/'.format(self.location, tree)
|
| |
elif self._relnum > 6:
|
| |
- url = '{0}/{1}/source/SRPMS/'.format(self.location, tree)
|
| |
+ url = '{}/{}/source/SRPMS/'.format(self.location, tree)
|
| |
elif self._relnum > 4:
|
| |
- url = '{0}/source/SRPMS/'.format(self.location)
|
| |
+ url = '{}/source/SRPMS/'.format(self.location)
|
| |
else:
|
| |
- url = '{0}/SRPMS/'.format(self.location)
|
| |
+ url = '{}/SRPMS/'.format(self.location)
|
| |
if split:
|
| |
for i in initials:
|
| |
- suburl = '{0}{1}/'.format(url, i)
|
| |
+ suburl = '{}{}/'.format(url, i)
|
| |
index = fedfind.helpers.urlopen_retries(suburl)
|
| |
text += index.read().decode('utf-8')
|
| |
else:
|
| |
@@ -1006,10 +1006,10 @@
|
| |
self._pdccid = ""
|
| |
|
| |
def __repr__(self):
|
| |
- return "{0}(location='{1}')".format(self.__class__, self.location)
|
| |
+ return "{}(location='{}')".format(self.__class__, self.location)
|
| |
|
| |
def __str__(self):
|
| |
- return "{0} {1}".format(self.__class__.__name__, self.location)
|
| |
+ return "{} {}".format(self.__class__.__name__, self.location)
|
| |
|
| |
@property
|
| |
def location(self):
|
| |
@@ -1042,7 +1042,7 @@
|
| |
@cached_property
|
| |
def https_url_generic(self):
|
| |
"""Everything tree is 'generic' for Pungi 4."""
|
| |
- return "{0}/{1}".format(self.location, "Everything")
|
| |
+ return "{}/{}".format(self.location, "Everything")
|
| |
|
| |
@property
|
| |
def status(self):
|
| |
@@ -1082,9 +1082,9 @@
|
| |
return self._metadata
|
| |
elif self.exists:
|
| |
try:
|
| |
- url = "{0}{1}".format(self._checkloc, "/metadata/composeinfo.json")
|
| |
+ url = "{}{}".format(self._checkloc, "/metadata/composeinfo.json")
|
| |
metadata['composeinfo'] = fedfind.helpers.download_json(url)
|
| |
- url = "{0}{1}".format(self._checkloc, "/metadata/images.json")
|
| |
+ url = "{}{}".format(self._checkloc, "/metadata/images.json")
|
| |
metadata['images'] = fedfind.helpers.download_json(url)
|
| |
if done:
|
| |
self._metadata = metadata
|
| |
@@ -1104,7 +1104,7 @@
|
| |
if not self._pdccid:
|
| |
# intentionally trigger except block
|
| |
raise ValueError("no pdccid")
|
| |
- origmd = fedfind.helpers.pdc_query('compose-images/{0}'.format(self._pdccid))
|
| |
+ origmd = fedfind.helpers.pdc_query('compose-images/{}'.format(self._pdccid))
|
| |
# we should also be able to retrieve the original
|
| |
# composeinfo dict, but I can't find that at all...
|
| |
except ValueError:
|
| |
@@ -1212,7 +1212,7 @@
|
| |
"""
|
| |
if self._version:
|
| |
return self._version
|
| |
- distsep = "{0}-".format(self.dist)
|
| |
+ distsep = "{}-".format(self.dist)
|
| |
return self.cid.split(distsep)[1]
|
| |
|
| |
@property
|
| |
@@ -1333,9 +1333,9 @@
|
| |
try:
|
| |
idx = complist.index(self.cid)
|
| |
except IndexError:
|
| |
- raise ValueError("Could not find previous compose for {0}".format(self))
|
| |
+ raise ValueError("Could not find previous compose for {}".format(self))
|
| |
if idx == 0:
|
| |
- raise IndexError("{0} is the first compose of its type for this release!".format(self))
|
| |
+ raise IndexError("{} is the first compose of its type for this release!".format(self))
|
| |
return get_release(cid=complist[idx-1])
|
| |
|
| |
def get_package_nevras_pdc(self, packages):
|
| |
@@ -1360,7 +1360,7 @@
|
| |
verdict = dict((package, '') for package in packages)
|
| |
params = [('compose', self.cid), ('arch', 'src')]
|
| |
for package in packages:
|
| |
- params.append(('name', '^{0}$'.format(package)))
|
| |
+ params.append(('name', '^{}$'.format(package)))
|
| |
res = fedfind.helpers.pdc_query('rpms', params)
|
| |
if not res:
|
| |
logger.warning("get_package_nevras_pdc: No results found in PDC for compose %s! "
|
| |
@@ -1410,7 +1410,7 @@
|
| |
# productmd ComposeInfo class has a create_compose_id,
|
| |
# but it seems like more work to jump through the hoops
|
| |
# to instantiate that than it is to reproduce it...
|
| |
- testcid = "Fedora-{0}-{1}.n.{2}".format(self.release, date, respin)
|
| |
+ testcid = "Fedora-{}-{}.n.{}".format(self.release, date, respin)
|
| |
# we use get_release_cid not self.__class__ because the
|
| |
# params are different for the children classes
|
| |
test = get_release(cid=testcid)
|
| |
@@ -1419,7 +1419,7 @@
|
| |
return test
|
| |
logger.setLevel(loglevel)
|
| |
raise ValueError("Could not find previous compose for "
|
| |
- "{0}".format(self))
|
| |
+ "{}".format(self))
|
| |
|
| |
|
| |
class RawhideNightly(OldPreviousReleaseMixin, Pungi4Release):
|
| |
@@ -1427,7 +1427,7 @@
|
| |
def __init__(self, compose, respin=0, cid=None):
|
| |
compose = str(compose)
|
| |
respin = str(respin)
|
| |
- path = "rawhide/Fedora-Rawhide-{0}.n.{1}/compose".format(compose, respin)
|
| |
+ path = "rawhide/Fedora-Rawhide-{}.n.{}/compose".format(compose, respin)
|
| |
url = '/'.join((fedfind.const.NIGHTLY_BASE, path))
|
| |
super(RawhideNightly, self).__init__(url, release="Rawhide", milestone='', compose=compose,
|
| |
respin=respin, typ="nightly", cid=cid)
|
| |
@@ -1454,7 +1454,7 @@
|
| |
def __init__(self, compose, respin=0, cid=None):
|
| |
compose = str(compose)
|
| |
respin = str(respin)
|
| |
- path = "Fedora-Modular-Rawhide-{0}.n.{1}/compose".format(compose, respin)
|
| |
+ path = "Fedora-Modular-Rawhide-{}.n.{}/compose".format(compose, respin)
|
| |
url = '/'.join((fedfind.const.NIGHTLY_BASE, path))
|
| |
super(RawhideModularNightly, self).__init__(
|
| |
url, release="Rawhide", milestone='', compose=compose,
|
| |
@@ -1475,7 +1475,7 @@
|
| |
"""Server tree is 'generic' for modular composes at present,
|
| |
there is no Everything tree.
|
| |
"""
|
| |
- return "{0}/{1}".format(self.location, "Server")
|
| |
+ return "{}/{}".format(self.location, "Server")
|
| |
|
| |
|
| |
class BikeshedModularNightly(Pungi4Release):
|
| |
@@ -1486,7 +1486,7 @@
|
| |
def __init__(self, compose, respin=0, cid=None):
|
| |
compose = str(compose)
|
| |
respin = str(respin)
|
| |
- path = "Fedora-Modular-Bikeshed-{0}.n.{1}/compose".format(compose, respin)
|
| |
+ path = "Fedora-Modular-Bikeshed-{}.n.{}/compose".format(compose, respin)
|
| |
url = '/'.join((fedfind.const.NIGHTLY_BASE, path))
|
| |
super(BikeshedModularNightly, self).__init__(
|
| |
url, release="Bikeshed", milestone='', compose=compose,
|
| |
@@ -1507,7 +1507,7 @@
|
| |
"""Server tree is 'generic' for modular composes at present,
|
| |
there is no Everything tree.
|
| |
"""
|
| |
- return "{0}/{1}".format(self.location, "Server")
|
| |
+ return "{}/{}".format(self.location, "Server")
|
| |
|
| |
|
| |
class BranchedNightly(OldPreviousReleaseMixin, Pungi4Release):
|
| |
@@ -1516,7 +1516,7 @@
|
| |
release = str(release)
|
| |
compose = str(compose)
|
| |
respin = str(respin)
|
| |
- path = "branched/Fedora-{0}-{1}.n.{2}/compose".format(release, compose, respin)
|
| |
+ path = "branched/Fedora-{}-{}.n.{}/compose".format(release, compose, respin)
|
| |
url = '/'.join((fedfind.const.NIGHTLY_BASE, path))
|
| |
super(BranchedNightly, self).__init__(
|
| |
url, release=release, milestone="Branched", compose=compose,
|
| |
@@ -1542,7 +1542,7 @@
|
| |
release = str(release)
|
| |
compose = str(compose)
|
| |
respin = str(respin)
|
| |
- path = "Fedora-Modular-{0}-{1}.n.{2}/compose".format(release, compose, respin)
|
| |
+ path = "Fedora-Modular-{}-{}.n.{}/compose".format(release, compose, respin)
|
| |
url = '/'.join((fedfind.const.NIGHTLY_BASE, path))
|
| |
super(BranchedModularNightly, self).__init__(
|
| |
url, release=release, milestone="Branched", compose=compose,
|
| |
@@ -1570,7 +1570,7 @@
|
| |
release = str(release)
|
| |
compose = str(compose)
|
| |
respin = str(respin)
|
| |
- path = "twoweek/Fedora-Atomic-{0}-{1}.{2}/compose".format(release, compose, respin)
|
| |
+ path = "twoweek/Fedora-Atomic-{}-{}.{}/compose".format(release, compose, respin)
|
| |
url = '/'.join((fedfind.const.NIGHTLY_BASE, path))
|
| |
super(AtomicNightly, self).__init__(
|
| |
url, release=release, milestone="Nightly", compose=compose,
|
| |
@@ -1611,7 +1611,7 @@
|
| |
release = str(release)
|
| |
compose = str(compose)
|
| |
respin = str(respin)
|
| |
- path = "cloud/Fedora-Cloud-{0}-{1}.{2}/compose".format(release, compose, respin)
|
| |
+ path = "cloud/Fedora-Cloud-{}-{}.{}/compose".format(release, compose, respin)
|
| |
url = '/'.join((fedfind.const.NIGHTLY_BASE, path))
|
| |
super(CloudNightly, self).__init__(
|
| |
url, release=release, milestone="Nightly", compose=compose,
|
| |
@@ -1643,7 +1643,7 @@
|
| |
release = str(release)
|
| |
compose = str(compose)
|
| |
respin = str(respin)
|
| |
- path = "container/Fedora-Docker-{0}-{1}.{2}/compose".format(release, compose, respin)
|
| |
+ path = "container/Fedora-Docker-{}-{}.{}/compose".format(release, compose, respin)
|
| |
url = '/'.join((fedfind.const.NIGHTLY_BASE, path))
|
| |
super(DockerNightly, self).__init__(
|
| |
url, release=release, milestone="Nightly", compose=compose,
|
| |
@@ -1672,7 +1672,7 @@
|
| |
release = str(release)
|
| |
compose = str(compose)
|
| |
respin = str(respin)
|
| |
- path = "container/Fedora-Container-{0}-{1}.{2}/compose".format(release, compose, respin)
|
| |
+ path = "container/Fedora-Container-{}-{}.{}/compose".format(release, compose, respin)
|
| |
url = '/'.join((fedfind.const.NIGHTLY_BASE, path))
|
| |
super(ContainerNightly, self).__init__(
|
| |
url, release=release, milestone="Nightly", compose=compose,
|
| |
@@ -1702,7 +1702,7 @@
|
| |
release = str(release)
|
| |
compose = str(compose)
|
| |
respin = str(respin)
|
| |
- path = "iot/Fedora-IoT-{0}-{1}.{2}/compose".format(release, compose, respin)
|
| |
+ path = "iot/Fedora-IoT-{}-{}.{}/compose".format(release, compose, respin)
|
| |
url = '/'.join((fedfind.const.NIGHTLY_BASE, path))
|
| |
super(IoTNightly, self).__init__(
|
| |
url, release=release, milestone="Nightly", compose=compose,
|
| |
@@ -1737,7 +1737,7 @@
|
| |
release = str(release)
|
| |
compose = str(compose)
|
| |
respin = str(respin)
|
| |
- path = "updates/Fedora-{0}-updates-{1}.{2}/compose".format(release, compose, respin)
|
| |
+ path = "updates/Fedora-{}-updates-{}.{}/compose".format(release, compose, respin)
|
| |
url = '/'.join((fedfind.const.NIGHTLY_BASE, path))
|
| |
super(Updates, self).__init__(
|
| |
url, release=release, milestone="Updates", compose=compose,
|
| |
@@ -1772,7 +1772,7 @@
|
| |
release = str(release)
|
| |
compose = str(compose)
|
| |
respin = str(respin)
|
| |
- path = "updates/Fedora-{0}-updates-testing-{1}.{2}/compose".format(release, compose, respin)
|
| |
+ path = "updates/Fedora-{}-updates-testing-{}.{}/compose".format(release, compose, respin)
|
| |
url = '/'.join((fedfind.const.NIGHTLY_BASE, path))
|
| |
super(UpdatesTesting, self).__init__(
|
| |
url, release=release, milestone="Updates-testing", compose=compose,
|
| |
@@ -1827,7 +1827,7 @@
|
| |
_version in init as that would cause remote trips, do it here
|
| |
as a property.
|
| |
"""
|
| |
- return "{0} {1} {2}.{3}".format(self.release, self.milestone, self.compose, self.respin)
|
| |
+ return "{} {} {}.{}".format(self.release, self.milestone, self.compose, self.respin)
|
| |
|
| |
|
| |
class ModularProduction(Pungi4Release):
|
| |
@@ -1854,7 +1854,7 @@
|
| |
_version in init as that would cause remote trips, do it here
|
| |
as a property.
|
| |
"""
|
| |
- return "{0} Modular {1} {2}.{3}".format(
|
| |
+ return "{} Modular {} {}.{}".format(
|
| |
self.release, self.milestone, self.compose, self.respin)
|
| |
|
| |
|
| |
@@ -1873,9 +1873,9 @@
|
| |
milestone = str(milestone)
|
| |
compose = str(compose)
|
| |
respin = str(respin)
|
| |
- label = "{0}-{1}.{2}".format(milestone, compose, respin)
|
| |
- version = "{0} {1} {2}.{3}".format(release, milestone, compose, respin)
|
| |
- url = '{0}/alt/stage/{1}_{2}'.format(fedfind.const.HTTPS_DL, release, label)
|
| |
+ label = "{}-{}.{}".format(milestone, compose, respin)
|
| |
+ version = "{} {} {}.{}".format(release, milestone, compose, respin)
|
| |
+ url = '{}/alt/stage/{}_{}'.format(fedfind.const.HTTPS_DL, release, label)
|
| |
super(Compose, self).__init__(
|
| |
url, release=release, milestone=milestone, compose=compose,
|
| |
respin=respin, label=label, typ="production", version=version, cid=cid)
|
| |
@@ -1897,9 +1897,9 @@
|
| |
milestone = str(milestone)
|
| |
compose = str(compose)
|
| |
respin = str(respin)
|
| |
- label = "{0}-{1}.{2}".format(milestone, compose, respin)
|
| |
- version = "{0} Modular {1} {2}.{3}".format(release, milestone, compose, respin)
|
| |
- url = '{0}/alt/stage/{1}_Modular_{2}'.format(fedfind.const.HTTPS_DL, release, label)
|
| |
+ label = "{}-{}.{}".format(milestone, compose, respin)
|
| |
+ version = "{} Modular {} {}.{}".format(release, milestone, compose, respin)
|
| |
+ url = '{}/alt/stage/{}_Modular_{}'.format(fedfind.const.HTTPS_DL, release, label)
|
| |
super(ModularCompose, self).__init__(
|
| |
url, release=release, milestone=milestone, compose=compose,
|
| |
respin=respin, label=label, typ="production", version=version, cid=cid)
|
| |
@@ -1925,13 +1925,13 @@
|
| |
"""
|
| |
def __init__(self, path, **kwargs):
|
| |
self._basepath = path.rstrip('/')
|
| |
- super(Pungi4Mirror, self).__init__("{0}{1}".format(fedfind.const.HTTPS, path), **kwargs)
|
| |
+ super(Pungi4Mirror, self).__init__("{}{}".format(fedfind.const.HTTPS, path), **kwargs)
|
| |
|
| |
def __repr__(self):
|
| |
- return "{0}(path='{1}')".format(self.__class__, self._basepath)
|
| |
+ return "{}(path='{}')".format(self.__class__, self._basepath)
|
| |
|
| |
def __str__(self):
|
| |
- return "{0} {1}".format(self.__class__.__name__, self._basepath)
|
| |
+ return "{} {}".format(self.__class__.__name__, self._basepath)
|
| |
|
| |
@property
|
| |
def _checkloc(self):
|
| |
@@ -1968,7 +1968,7 @@
|
| |
# property if we can't find a real one. We store it on the
|
| |
# instance so methods can check if we have a real or fake one
|
| |
# by doing 'self.cid == self._fakecid".
|
| |
- self._fakecid = "Fedora-{0}-19700101.0".format(self.release)
|
| |
+ self._fakecid = "Fedora-{}-19700101.0".format(self.release)
|
| |
|
| |
@abc.abstractproperty
|
| |
def _basepath(self):
|
| |
@@ -2084,7 +2084,7 @@
|
| |
return self._exists
|
| |
url = self.https_url_generic.replace(fedfind.const.HTTPS, fedfind.const.HTTPS_DL)
|
| |
if not url:
|
| |
- url = '{0}/{1}'.format(fedfind.const.HTTPS_DL, self._basepath)
|
| |
+ url = '{}/{}'.format(fedfind.const.HTTPS_DL, self._basepath)
|
| |
logger.debug("exists: checking URL %s", url)
|
| |
if fedfind.helpers.url_exists(url):
|
| |
self._exists = True
|
| |
@@ -2105,9 +2105,9 @@
|
| |
Used for constructing image paths, etc.
|
| |
"""
|
| |
if self._prefurl == "direct":
|
| |
- return "{0}/{1}".format(fedfind.const.HTTPS_DL, self._basepath)
|
| |
+ return "{}/{}".format(fedfind.const.HTTPS_DL, self._basepath)
|
| |
else:
|
| |
- return "{0}/{1}".format(fedfind.const.HTTPS, self._basepath)
|
| |
+ return "{}/{}".format(fedfind.const.HTTPS, self._basepath)
|
| |
|
| |
@property
|
| |
def alt_location(self):
|
| |
@@ -2115,9 +2115,9 @@
|
| |
Used for constructing image paths, etc.
|
| |
"""
|
| |
if self._prefurl == "direct":
|
| |
- return "{0}/{1}".format(fedfind.const.HTTPS_DL, self._altbasepath)
|
| |
+ return "{}/{}".format(fedfind.const.HTTPS_DL, self._altbasepath)
|
| |
else:
|
| |
- return "{0}/{1}".format(fedfind.const.HTTPS, self._altbasepath)
|
| |
+ return "{}/{}".format(fedfind.const.HTTPS, self._altbasepath)
|
| |
|
| |
@property
|
| |
def https_url_generic(self):
|
| |
@@ -2129,11 +2129,11 @@
|
| |
if self._relnum < 7:
|
| |
return self.location
|
| |
elif self._relnum < 21:
|
| |
- return '{0}/Fedora'.format(self.location)
|
| |
+ return '{}/Fedora'.format(self.location)
|
| |
elif self._relnum <= 23:
|
| |
- return '{0}/Server'.format(self.location)
|
| |
+ return '{}/Server'.format(self.location)
|
| |
else:
|
| |
- return '{0}/Everything'.format(self.location)
|
| |
+ return '{}/Everything'.format(self.location)
|
| |
|
| |
@property
|
| |
def metadata(self):
|
| |
@@ -2163,7 +2163,7 @@
|
| |
# We can try to get the real metadata from PDC and just
|
| |
# tweak it a bit.
|
| |
try:
|
| |
- origmd = fedfind.helpers.pdc_query('compose-images/{0}'.format(self.cid))
|
| |
+ origmd = fedfind.helpers.pdc_query('compose-images/{}'.format(self.cid))
|
| |
# we should also be able to retrieve the original
|
| |
# composeinfo dict, but I can't find that at all...
|
| |
except ValueError:
|
| |
@@ -2320,7 +2320,7 @@
|
| |
relname = '_'.join((self.release, self.milestone))
|
| |
else:
|
| |
relname = self.release
|
| |
- exp = re.compile(r'-{0}-(\d+\.\d+)\.'.format(relname))
|
| |
+ exp = re.compile(r'-{}-(\d+\.\d+)\.'.format(relname))
|
| |
for (_, path) in self.all_paths:
|
| |
fname = path.split('/')[-1]
|
| |
match = exp.search(fname)
|
| |
@@ -2385,11 +2385,11 @@
|
| |
|
| |
@property
|
| |
def _basepath(self):
|
| |
- return 'fedora/linux/releases/test/{0}_{1}'.format(self.release, self.milestone)
|
| |
+ return 'fedora/linux/releases/test/{}_{}'.format(self.release, self.milestone)
|
| |
|
| |
@property
|
| |
def _altbasepath(self):
|
| |
- return 'alt/releases/test/{0}_{1}'.format(self.release, self.milestone)
|
| |
+ return 'alt/releases/test/{}_{}'.format(self.release, self.milestone)
|
| |
|
| |
## STABLE RELEASE CLASSES ##
|
| |
|
| |
@@ -2411,11 +2411,11 @@
|
| |
|
| |
@property
|
| |
def _basepath(self):
|
| |
- return 'fedora/linux/releases/{0}'.format(self.release)
|
| |
+ return 'fedora/linux/releases/{}'.format(self.release)
|
| |
|
| |
@property
|
| |
def _altbasepath(self):
|
| |
- return 'alt/releases/{0}'.format(self.release)
|
| |
+ return 'alt/releases/{}'.format(self.release)
|
| |
|
| |
|
| |
class ArchiveRelease(MirrorRelease):
|
| |
@@ -2433,12 +2433,12 @@
|
| |
|
| |
@property
|
| |
def _basepath(self):
|
| |
- return 'archive/fedora/linux/releases/{0}'.format(self.release)
|
| |
+ return 'archive/fedora/linux/releases/{}'.format(self.release)
|
| |
|
| |
@property
|
| |
def _altbasepath(self):
|
| |
if self._relnum > 14:
|
| |
- return 'alt/releases/{0}'.format(self.release)
|
| |
+ return 'alt/releases/{}'.format(self.release)
|
| |
else:
|
| |
# there were no 'alt' bits prior to F15
|
| |
return None
|
| |
@@ -2459,7 +2459,7 @@
|
| |
|
| |
@property
|
| |
def _basepath(self):
|
| |
- return 'archive/fedora/linux/core/{0}'.format(self.release)
|
| |
+ return 'archive/fedora/linux/core/{}'.format(self.release)
|
| |
|
| |
@property
|
| |
def _altbasepath(self):
|
| |
@@ -2500,20 +2500,20 @@
|
| |
"Could not determine release and compose for current respin release!")
|
| |
if release and release != gotrelease:
|
| |
raise fedfind.exceptions.DiscoveryError(
|
| |
- "RespinRelease: discovered release {0} does not match "
|
| |
- "requested release {1}!".format(gotrelease, release))
|
| |
+ "RespinRelease: discovered release {} does not match "
|
| |
+ "requested release {}!".format(gotrelease, release))
|
| |
if compose and compose != gotcompose:
|
| |
raise fedfind.exceptions.DiscoveryError(
|
| |
- "RespinRelease: discovered compose {0} does not match "
|
| |
- "requested compose {1}!".format(gotcompose, compose))
|
| |
+ "RespinRelease: discovered compose {} does not match "
|
| |
+ "requested compose {}!".format(gotcompose, compose))
|
| |
super(RespinRelease, self).__init__(gotrelease, milestone, gotcompose)
|
| |
# if we got this far, we already know we exist
|
| |
self._exists = True
|
| |
# custom fake CID for these releases
|
| |
- self._fakecid = "FedoraRespin-{0}-updates-{1}.0".format(self.release, self.compose)
|
| |
+ self._fakecid = "FedoraRespin-{}-updates-{}.0".format(self.release, self.compose)
|
| |
|
| |
def __repr__(self):
|
| |
- return "{0}()".format(self.__class__)
|
| |
+ return "{}()".format(self.__class__)
|
| |
|
| |
@property
|
| |
def _basepath(self):
|
| |
RHEL 6 doesn't go EOL till November, but the tests mysteriously
fail on EPEL 6 since 4.3.0, tox in current Fedoras can't run a
py26 environment any more, and my quotient of f**s to give is
running low...so we officially don't support py26 any more as of
now. Next on the chopping block: py27.
This drops py26 (and all the special handling for it) from the
tox configuration, and updates some code to use syntax that only
works in 2.7 or later, and drops various annoying workarounds
that were only needed for RHEL 6 / Python 2.6 compatibility in
other ways.
Signed-off-by: Adam Williamson awilliam@redhat.com