Contradiction in bus names naming in D-Bus spec
Igor Plastov
chetverovod at gmail.com
Mon Feb 1 15:25:43 UTC 2021
Just ":" is also valid:
~# python3 -ic "import dbussy"
>>> dbussy.validate_bus_name(":")
True
>>>
It looks strange.
пн, 1 февр. 2021 г. в 18:07, Igor Plastov <chetverovod at gmail.com>:
> More over:
> rule 3: Each element must only contain the ASCII characters
> "[A-Z][a-z][0-9]_-", with "-" discouraged in new bus names. Only elements
> that are part of a unique connection name may begin with a digit, elements
> in other bus names must not begin with a digit.
> Validation returns OK, for name ":.a":
> ~# python3 -ic "import dbussy"
> >>> dbussy.validate_bus_name(":.a")
> True
> >>>
>
> пн, 1 февр. 2021 г. в 16:13, Igor Plastov <chetverovod at gmail.com>:
>
>> ~# python3 -ic "import dbussy"
>> >>> dbussy.validate_bus_name(":a")
>> True
>> >>>
>>
>> пн, 1 февр. 2021 г. в 02:56, Lawrence D'Oliveiro <ldo at geek-central.gen.nz
>> >:
>>
>>> On Sun, 31 Jan 2021 23:11:07 +0100, Bogdan Lotko wrote:
>>>
>>> > Much more interesting question is are the "a." or ".a" legal?
>>>
>>> >>> dbussy.validate_bus_name("a.")
>>> Traceback (most recent call last):
>>> File "<stdin>", line 1, in <module>
>>> File "/home/ldo/projects/dbussy/dbussy.py", line 5826, in
>>> validate_bus_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 -- Bus name
>>> was not valid: 'a.'
>>> >>> dbussy.validate_bus_name(".b")
>>> Traceback (most recent call last):
>>> File "<stdin>", line 1, in <module>
>>> File "/home/ldo/projects/dbussy/dbussy.py", line 5826, in
>>> validate_bus_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 -- Bus name
>>> was not valid: '.b'
>>>
>>> Nope.
>>> _______________________________________________
>>> dbus mailing list
>>> dbus at lists.freedesktop.org
>>> https://lists.freedesktop.org/mailman/listinfo/dbus
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dbus/attachments/20210201/cf0dbec6/attachment.htm>
More information about the dbus
mailing list