Mini Shell
3
@��e
� @ s\ d dl mZ d dlmZ d dlmZ ee�ZdZdZ dZ
dZdZdZ
d Zd
d� Zdd
� ZdS )� )� safe_dbus)�Variant)�get_module_loggerzorg.freedesktop.ScreenSaverz/org/freedesktop/ScreenSaverZInhibitZ UnInhibitZanacondaZ
Installingc C s\ y&t jtttttdttf�| �}|d S t j k
rV } zt
jd|� W Y dd}~X nX dS )z�
Inhibit the screensaver idle timer.
:param connection: A handle for the session message bus
:type connection: Gio.DBusConnection
:return: The inhibit ID or None
:rtype: int or None
z(ss)r z%Unable to inhibit the screensaver: %sN)r � call_sync�SCREENSAVER_SERVICE�SCREENSAVER_PATH�SCREENSAVER_IFACE�SCREENSAVER_INHIBIT_METHODr �SCREENSAVER_APPLICATION�SCREENSAVER_REASON�
DBusCallError�log�info)�
connection�
inhibit_id�e� r �#/usr/lib64/python3.6/screensaver.py�inhibit_screensaver$ s
r c C sV y t jtttttd|f�| � W n0 t jk
rP } ztj d|� W Y dd}~X nX dS )z�
Re-enable the screensaver idle timer.
:param connection: A handle for the session message bus
:type connection: Gio.DBusConnection
:param inhibit_id: The ID returned by the inhibit method
:type inhibit_id: int
z(u)z'Unable to uninhibit the screensaver: %sN)
r r r r r �SCREENSAVER_UNINHIBIT_METHODr r r
r )r r r r r r �uninhibit_screensaver: s
r N)Z
pyanacondar Zpyanaconda.core.glibr Zpyanaconda.anaconda_loggersr �__name__r
r r r r r r
r r r r r r r �<module> s