]> sourceware.org Git - lvm2.git/commit
Fix converting dbus.UInt types to string
authorVojtech Trefny <vtrefny@redhat.com>
Mon, 26 Aug 2019 12:35:51 +0000 (14:35 +0200)
committerTony Asleson <tasleson@redhat.com>
Tue, 27 Aug 2019 14:43:43 +0000 (09:43 -0500)
commit32a8865a272d31d5bc12332a4da0309ce3af9243
tree6c254cfe9b28ea34702d4c8a3ae40bd71dbe838c
parentb2885b7103049b11ca3e98fe0c8898df2ce5f9ac
Fix converting dbus.UInt types to string

With Python 3.8 converting these directly to string using str()
no longer works, we need to convert these to integer first.

On Python 3.8:

>>> str(dbus.Int64(1))
'dbus.Int64(1)'

On Python 3.7 (and older):
>>> str(dbus.UInt64(1))
'1'

This is probably related to removing __str__ function from method
from int (dbus.UInt is subclass of int) which happened in 3.8, see
https://docs.python.org/3.8/whatsnew/3.8.html

Signed-off-by: Vojtech Trefny <vtrefny@redhat.com>
daemons/lvmdbusd/cmdhandler.py
This page took 0.039293 seconds and 5 git commands to generate.