/usr/lib/python3/dist-packages/pydbus/timeout.py is in python3-pydbus 0.6.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | from gi.repository import GLib, GObject
def timeout_to_glib(timeout):
if timeout is None:
try:
return GLib.MAXINT
except AttributeError:
# GLib < 2.46
return GObject.G_MAXINT
else:
try:
timeout = timeout.total_seconds()
except AttributeError:
pass
return int(timeout * 1000)
|