~jderose/ubuntu/precise/dbus-python/oneiric-backport

« back to all changes in this revision

Viewing changes to dbus/_compat.py

  • Committer: Package Import Robot
  • Author(s): Barry Warsaw
  • Date: 2012-01-12 14:47:33 UTC
  • Revision ID: package-import@ubuntu.com-20120112144733-xtfbmgw30h0j40d2
Tags: 0.84.0-2ubuntu1
* debian/patches:
  - since-0.84.0.patch: Upstream unreleased changes from git tag
    dbus-python-0.84.0 to HEAD.  This is a precursor to the following.
  - python3-support.patch: Upstream unreleased changes from git
    `python3` branch for supporting Python 3. (LP: #893091)
* debian/rules: Enable the test suite.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Python 2 / Python 3 compatibility helpers.
 
2
 
 
3
import sys
 
4
 
 
5
# In Python 2.6, sys.version_info is not a namedtuple, so we can't use
 
6
# sys.version_info.major.
 
7
is_py3 = (sys.version_info[0] == 3)
 
8
is_py2 = not is_py3