Python D-Bus Deprecation Warning
Bogdan Lotko
boguslaw.lotko at chello.at
Sat Aug 4 11:46:18 PDT 2012
Hello,
By executing of the modified example-signal-emitter.py on SLES 11
(python 2.6)
#!/usr/bin/env python
import gobject
import dbus
import dbus.service
import dbus.mainloop.glib
class IMstkSignalSender(dbus.service.Object):
def __init__(self, conn, object_path='/mypath'):
dbus.service.Object.__init__(self, conn, object_path)
@dbus.service.signal('my.priv.xxx.if')
def updateTcLink(self, tcLinkStatus):
print "My Message"
if __name__ == '__main__':
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
#bus = dbus.SessionBus()
bus = dbus.bus.BusConnection("tcp:host=192.168.0.98,port=12345")
obj = IMstkSignalSender(bus)
obj.updateTcLink( 1 )
the following Deprecation Warning is displayed:
/usr/lib/python2.6/site-packages/dbus/connection.py:242:
DeprecationWarning: object.__init__() takes no parameters
super(Connection, self).__init__(*args, **kwargs)
what is wrong in the fallowing call?
bus = dbus.bus.BusConnection("tcp:host=192.168.0.98,port=12345")
How to get rid of this message?
Thanks for your help,
with best regards,
B.Lotko
More information about the dbus
mailing list