From 1dac2263372df2b85db5d029a45721fa158a5c9d Mon Sep 17 00:00:00 2001 From: xiubuzhe Date: Sun, 8 Oct 2023 20:59:00 +0800 Subject: first add files --- lib/dbus/_compat.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 lib/dbus/_compat.py (limited to 'lib/dbus/_compat.py') diff --git a/lib/dbus/_compat.py b/lib/dbus/_compat.py new file mode 100644 index 0000000..3e5f148 --- /dev/null +++ b/lib/dbus/_compat.py @@ -0,0 +1,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.' + ) -- cgit v1.2.3