summaryrefslogtreecommitdiff
path: root/scripts/import_cldr.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/import_cldr.py')
-rwxr-xr-xscripts/import_cldr.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/scripts/import_cldr.py b/scripts/import_cldr.py
index 5de707c..5630ba8 100755
--- a/scripts/import_cldr.py
+++ b/scripts/import_cldr.py
@@ -12,13 +12,12 @@
# history and logs, available at http://babel.edgewall.org/log/.
import collections
-from optparse import OptionParser
+import logging
import os
import pickle
import re
import sys
-import logging
-
+from optparse import OptionParser
from xml.etree import ElementTree
# Make sure we're using Babel source, and not some previously installed version
@@ -44,7 +43,7 @@ def _text(elem):
for child in elem:
buf.append(_text(child))
buf.append(elem.tail or '')
- return u''.join(filter(None, buf)).strip()
+ return ''.join(filter(None, buf)).strip()
NAME_RE = re.compile(r"^\w+$")
@@ -130,7 +129,7 @@ def _time_to_seconds_past_midnight(time_expr):
return None
if time_expr.count(":") == 1:
time_expr += ":00"
- hour, minute, second = [int(p, 10) for p in time_expr.split(":")]
+ hour, minute, second = (int(p, 10) for p in time_expr.split(":"))
return hour * 60 * 60 + minute * 60 + second
@@ -991,6 +990,5 @@ def parse_measurement_systems(data, tree):
_import_type_text(measurement_systems, measurement_system, type=type)
-
if __name__ == '__main__':
main()