diff options
author | Tomi Pieviläinen <tomi.pievilainen+launchpad@iki.fi> | 2012-03-28 18:04:02 +0300 |
---|---|---|
committer | Tomi Pieviläinen <tomi.pievilainen+launchpad@iki.fi> | 2012-03-28 18:04:02 +0300 |
commit | e5515075578b4dce946e22a80ed87041405512ba (patch) | |
tree | ed182321be549b1cfd8cbdc6eb4eb610c9692764 /dateutil/zoneinfo | |
parent | 4e5cd8f57f07f634411034a1571c23decb15aad1 (diff) | |
download | dateutil-e5515075578b4dce946e22a80ed87041405512ba.tar.gz |
Change tzdata ftp server and processing
Due to Astrolabe lawsuite, the tzdata is now hosted at IANA. It seems like
something has changed in the file ordering too, so that backwards now needs
to be explicitly ordered as last to make links work (there was a bug that
UTC wasn't linked to Etc/UTC, for example).
Diffstat (limited to 'dateutil/zoneinfo')
-rw-r--r-- | dateutil/zoneinfo/__init__.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/dateutil/zoneinfo/__init__.py b/dateutil/zoneinfo/__init__.py index 0ffb294..a1b3487 100644 --- a/dateutil/zoneinfo/__init__.py +++ b/dateutil/zoneinfo/__init__.py @@ -66,7 +66,10 @@ def rebuild(filename, tag=None, format="gz"): targetname = "zoneinfo%s.tar.%s" % (tag, format) try: tf = TarFile.open(filename) - for name in tf.getnames(): + # The "backwards" zone file contains links to other files, so must be + # processed as last + for name in sorted(tf.getnames(), + key=lambda k: k != "backward" and k or "z"): if not (name.endswith(".sh") or name.endswith(".tab") or name == "leapseconds"): |