Skip to content

Unix file descriptors not supported #42

@jawsper

Description

@jawsper

When I try to inhibit the power key on org.freedesktop.login1, pydbus doesn't seem to return the file descriptor, nor does it give me an error.

Sample code:

import pydbus
bus = pydbus.SystemBus()
login1 = bus.get('.login1')['.Manager']
fd = login1.Inhibit('handle-power-key', 'AppName', 'Reason', 'block')

Expected result is a valid file descriptor.
Actual result is 0.

This does work fine in python-dbus:

import dbus
bus = dbus.SystemBus()
proxy = bus.get_object('org.freedesktop.login1', '/org/freedesktop/login1')
login1 = dbus.Interface(proxy, 'org.freedesktop.login1.Manager')
fd = login1.Inhibit('handle-power-key', 'test_logind', 'test_logind handling power button', 'block').take()

This is on python 3.6.0 with pydbus version 0.6.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions