~takluyver/ubuntu/quantal/python-tz/merge-py3

« back to all changes in this revision

Viewing changes to debian/patches/tzdata

  • Committer: Bazaar Package Importer
  • Author(s): Fabio Tranchitella
  • Date: 2010-01-27 18:33:59 UTC
  • mfrom: (1.1.17 upstream) (2.1.12 sid)
  • Revision ID: james.westby@ubuntu.com-20100127183359-7vxnxgzl5ysokzue
Tags: 2010b-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
3
@@ -50,17 +50,12 @@
 
4
     Uses the pkg_resources module if available and no standard file
 
5
     found at the calculated location.
 
6
     """
 
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')
 
21
 
 
22