Re: Contradiction in bus names naming in D-Bus spec

Lawrence D'Oliveiro <ldo-kC51rjc0cqs1dNLGKZg6taU/[email protected]>
Newsgroups gmane.comp.freedesktop.dbus
Organization Geek Central
Message-ID <[email protected]>
On Mon, 1 Feb 2021 18:25:43 +0300, Igor Plastov wrote:

> Just ":" is also valid:
> ~# python3 -ic "import dbussy"
> >>> dbussy.validate_bus_name(":")  
> True
> >>>  
> It looks strange.

Ah, but

    >>> import dbussy; from dbussy import DBUS
    >>> bus = dbussy.Connection.bus_get(DBUS.BUS_SESSION, False)
    >>> bus.bus_request_name("a.b", DBUS.NAME_FLAG_DO_NOT_QUEUE)
    1
    >>> bus.bus_request_name(":", DBUS.NAME_FLAG_DO_NOT_QUEUE)
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/home/ldo/projects/dbussy/dbussy.py", line 3130, in bus_request_name
        my_error.raise_if_set()
      File "/home/ldo/projects/dbussy/dbussy.py", line 5035, in raise_if_set
        raise DBusError(self.name, self.message)
    dbussy.DBusError: org.freedesktop.DBus.Error.InvalidArgs -- Cannot acquire a service starting with ':' such as ":"
_______________________________________________
dbus mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dbus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.