File: _compat.py

package info (click to toggle)
dbus-python 1.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,708 kB
  • sloc: ansic: 9,653; python: 4,664; makefile: 597; sh: 428
file content (15 lines) | stat: -rw-r--r-- 338 bytes parent folder | download | duplicates (2)
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.'
    )