summaryrefslogtreecommitdiffstats
path: root/util/locale_database/ldml.py
diff options
context:
space:
mode:
authorIevgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>2021-07-05 17:45:26 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-07-15 19:19:14 +0000
commit604d06fb5763f44800c5f88e48e4476fad72f648 (patch)
tree9185cb6108543d17e81b90100b1ad434d58a79ed /util/locale_database/ldml.py
parent484a616d5e2ac011cb2e207eec22c65541fd58a2 (diff)
Convert CLDR scripts to Python 3
The convertion is moslty done using 2to3 script with manual cleanup afterwards. Task-number: QTBUG-83488 Change-Id: I4d33b04e7269c55a83ff2deb876a23a78a89f39d Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit b02d17c5c0f01a6c24cacaea2a3a41bfcc37490f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'util/locale_database/ldml.py')
-rw-r--r--util/locale_database/ldml.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/locale_database/ldml.py b/util/locale_database/ldml.py
index ef40be47af..77a64fdef4 100644
--- a/util/locale_database/ldml.py
+++ b/util/locale_database/ldml.py
@@ -124,7 +124,7 @@ class Node (object):
one."""
seq = self.findAllChildren(tag)
try:
- node = seq.next()
+ node = next(seq)
except StopIteration:
raise Error('No child found where one was expected', tag)
for it in seq:
@@ -197,7 +197,7 @@ class Supplement (XmlScanner):
for e in elts):
if elt.attributes:
yield (elt.nodeName,
- dict((k, v if isinstance(v, basestring) else v.nodeValue)
+ dict((k, v if isinstance(v, str) else v.nodeValue)
for k, v in elt.attributes.items()))
class LocaleScanner (object):
@@ -312,7 +312,7 @@ class LocaleScanner (object):
except Error:
money = self.find(xpath)
money = self.__currencyFormats(money, plus, minus)
- yield 'currencyFormat', money.next()
+ yield 'currencyFormat', next(money)
neg = ''
for it in money:
assert not neg, 'There should be at most one more pattern'