summaryrefslogtreecommitdiff
path: root/dbus/_compat.py
blob: 3e5f148b9f206991250a6156f8ed490507ec9540 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Python 2 / Python 3 compatibility helpers.
# Copyright 2011 Barry Warsaw
# Copyright 2021 Collabora Ltd.
# SPDX-License-Identifier: MIT

import sys

is_py3 = True
is_py2 = False

if sys.version_info.major < 3:
    raise AssertionError(
        'Python 2 has reached end-of-life, and dbus-python no longer '
        'supports it.'
    )