*** This bug is a duplicate of bug 1848829 ***
https://bugs.launchpad.net/bugs/1848829
All right, cosidering Brian feedback I found the way to override the
issue.
This is my modification to distro-info.py file sitting in:
/usr/local/lib/python3.6/dist-packages/
I had to add 2 methods to get going, all the rest of the code is the
same.
class DistroRecord(object):
def __init__(self, row):
self.version = row['version']
self.codename = row['codename']
self.series = row['series']
self.created = row['created']
self.release = row['release']
self.eol = row['eol']
# self.eol_server = row['eol-server'] if not None else None
# self.eol_esm = row['eol-esm'] if not None else None
class DistroInfo(object):
"""Base class for distribution information.
Use DebianDistroInfo or UbuntuDistroInfo instead of using this directly.
"""
def __init__(self, distro):
self._distro = distro
filename = os.path.join(_get_data_dir(), distro.lower() + ".csv")
csvfile = open(filename)
csv_reader = csv.DictReader(csvfile)
self._rows = []
self._date = datetime.date.today()
self.versions = []
for row in csv_reader:
for column in ("created", "release", "eol", "eol-server"):
if column in row:
row[column] = convert_date(row[column])
self._rows.append(row)
self.versions.append(DistroRecord(row))
@property
def all(self, result="codename"):
"""List all known distributions."""
return [self._format(result, x) for x in self._rows]
def get_all(self, mode):
if mode=='object':
return self.versions
def version(self, codename):
return next((x.version for x in self.versions if x.series == codename),
None)
...
all the same after this
with those changes distro upgrade gets going, so far.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1874250
Title:
do-release-upgrade fails 19.10->20.04 AttributeError:
'UbuntuDistroInfo' object has no attribute 'version'
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1874250/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs