From 8686bd9e2772ce03a24abc9b9727a435328b7c67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Cepl?= Date: Thu, 21 Jul 2016 08:52:32 +0200 Subject: [PATCH] Yet another fix of the patch --- pytz-zoneinfo.patch | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/pytz-zoneinfo.patch b/pytz-zoneinfo.patch index 908b0f4..6290b53 100644 --- a/pytz-zoneinfo.patch +++ b/pytz-zoneinfo.patch @@ -9,15 +9,18 @@ __all__ = [ 'timezone', 'utc', 'country_timezones', 'country_names', -@@ -77,23 +77,16 @@ def open_resource(name): - Uses the pkg_resources module if available and no standard file - found at the calculated location. - """ -+ _tzinfo_dir = os.getenv("TZDIR") or "/usr/share/zoneinfo" -+ if _tzinfo_dir.endswith(os.sep): -+ _tzinfo_dir = _tzinfo_dir[:-1] +@@ -70,6 +70,10 @@ else: # Python 2.x + """ + return s.encode('ASCII') + ++_tzinfo_dir = os.getenv("TZDIR") or "/usr/share/zoneinfo" ++if _tzinfo_dir.endswith(os.sep): ++ _tzinfo_dir = _tzinfo_dir[:-1] + - name_parts = name.lstrip('/').split('/') + + def open_resource(name): + """Open a resource from the zoneinfo subdir for reading. +@@ -81,19 +85,8 @@ def open_resource(name): for part in name_parts: if part == os.path.pardir or os.path.sep in part: raise ValueError('Bad path segment: %r' % part)