1
--- pytz-2010b/pytz/__init__.py 2010-01-26 08:10:01.000000000 +0100
2
+++ ../trunk/pytz/__init__.py 2010-01-27 18:34:17.000000000 +0100
4
Uses the pkg_resources module if available and no standard file
5
found at the calculated location.
7
+ # Patched in Debian, use the system zoninfo from the tzdata package
8
name_parts = name.lstrip('/').split('/')
9
for part in name_parts:
10
if part == os.path.pardir or os.path.sep in part:
11
raise ValueError('Bad path segment: %r' % part)
12
- filename = os.path.join(os.path.dirname(__file__),
13
- 'zoneinfo', *name_parts)
14
- if not os.path.exists(filename) and resource_stream is not None:
15
- # http://bugs.launchpad.net/bugs/383171 - we avoid using this
16
- # unless absolutely necessary to help when a broken version of
17
- # pkg_resources is installed.
18
- return resource_stream(__name__, 'zoneinfo/' + name)
19
+ filename = os.path.join('/usr/share/zoneinfo', *name_parts)
20
return open(filename, 'rb')