Merge software-properties:getiterator-python39-deprecated into software-properties:ubuntu/master

Proposed by Sebastien Bacher
Status: Merged
Approved by: Julian Andres Klode
Approved revision: 9e4fae072328dd73cb12c5577ed2d17da443f03f
Merged at revision: 9e4fae072328dd73cb12c5577ed2d17da443f03f
Proposed branch: software-properties:getiterator-python39-deprecated
Merge into: software-properties:ubuntu/master
Diff against target: 13 lines (+1/-1)
1 file modified
softwareproperties/CountryInformation.py (+1/-1)
Reviewer Review Type Date Requested Status
Julian Andres Klode Approve
Review via email: mp+401192@code.launchpad.net

Commit message

Remove use of getiterator which is deprecated in python3.9

https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1909918

To post a comment you must log in.
Revision history for this message
Julian Andres Klode (juliank) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/softwareproperties/CountryInformation.py b/softwareproperties/CountryInformation.py
2index 1af1e8d..c349974 100644
3--- a/softwareproperties/CountryInformation.py
4+++ b/softwareproperties/CountryInformation.py
5@@ -31,7 +31,7 @@ class CountryInformation(object):
6 fname = "/usr/share/xml/iso-codes/iso_3166.xml"
7 if os.path.exists(fname):
8 et = ElementTree(file=fname)
9- it = et.getiterator('iso_3166_entry')
10+ it = et.iter('iso_3166_entry')
11 for elm in it:
12 if "common_name" in elm.attrib:
13 descr = elm.attrib["common_name"]

Subscribers

People subscribed via source and target branches