我試圖讓腳本在我的USB連接時啓動我的自定義腳本。 我找到很好的Python腳本here但是當它調用GetAllProperties()方法我得到一個異常:DBus對象錯誤
ERROR:dbus.connection:Exception in handler for D-Bus signal:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/dbus/connection.py", line 214, in maybe_handle_message
self._handler(*args, **kwargs)
File "./hal-automount", line 31, in device_added
properties = self.udi_to_device(udi).GetAllProperties()
File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 68, in __call__
return self._proxy_method(*args, **keywords)
File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 140, in __call__
**keywords)
File "/usr/lib/python2.7/site-packages/dbus/connection.py", line 630, in call_blocking
message, timeout)
DBusException: org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 3 matched rules; type="method_call", sender=":1.39539" (uid=0 pid=9527 comm="python) interface="(unset)" member="getAllProperties" error name="(unset)" requested_reply=0 destination=":1.8" (uid=0 pid=3039 comm="/usr/sbin/hald))
OS:OpenSUSE 11.4中
我沒有的DBus工作之前,你能不能給我提示有什麼問題? 謝謝。
非常感謝,它的作品! :) – ink
這看起來與我的問題有關 - 你能檢查出來嗎? http://stackoverflow.com/questions/34424037/dbus-to-python-takes-exactly-1-argument – ArtOfWarfare