summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJun Omae <jun66j5@gmail.com>2015-08-04 20:15:25 +0900
committerJun Omae <jun66j5@gmail.com>2015-08-06 00:02:49 +0900
commit94f68302796149898fe99c14edc2a5519baad5e8 (patch)
treee4a3b827b291cec46cb462db66d7bb8ed1464441 /scripts
parent5c073d75a581a178c4679a073553c589d79c1d7e (diff)
downloadbabel-94f68302796149898fe99c14edc2a5519baad5e8.tar.gz
Removed uses of datetime.date class from *.dat files (#174)
To avoid incompatible *.dat files between Python 2 and 3.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/import_cldr.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/scripts/import_cldr.py b/scripts/import_cldr.py
index 7dcd171..1b00923 100755
--- a/scripts/import_cldr.py
+++ b/scripts/import_cldr.py
@@ -21,8 +21,6 @@ try:
except ImportError:
from xml.etree import ElementTree
-from datetime import date
-
# Make sure we're using Babel source, and not some previously installed version
sys.path.insert(0, os.path.join(os.path.dirname(sys.argv[0]), '..'))
@@ -103,12 +101,12 @@ def _parse_currency_date(s):
if not s:
return None
parts = s.split('-', 2)
- return date(*map(int, parts + [1] * (3 - len(parts))))
+ return tuple(map(int, parts + [1] * (3 - len(parts))))
def _currency_sort_key(tup):
code, start, end, tender = tup
- return int(not tender), start or date(1, 1, 1)
+ return int(not tender), start or (1, 1, 1)
def main():