summaryrefslogtreecommitdiffstats
path: root/python/decorators.py
diff options
context:
space:
mode:
authorJohn (J5) Palmieri <johnp@redhat.com>2005-05-24 16:30:51 +0000
committerJohn (J5) Palmieri <johnp@redhat.com>2005-05-24 16:30:51 +0000
commit982e34a1ec594ae8ad8c27a651b6eba68dcae40e (patch)
tree0daec34abaa48b1d776497f4b4c72b8748ad39c3 /python/decorators.py
parente43a353d27f1b9643c21ccff53a7759fc3dcdffe (diff)
* python/decorators.py: add explicitly_pass_message decorator
for passing in the dbus message as keyword for edge case signal handling * python/matchrules.py (SignalMatchRule.__repr__): fix output to conform with what dbus expects for match rules (SignalMatchRule.execute): add the dbus message as a keyword if the signal handler has requested it * python/examples/example/signal-recipient.py: added some more examples on how to hook up to signals * python/proxies.py: minor formatting changes
Diffstat (limited to 'python/decorators.py')
-rw-r--r--python/decorators.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/python/decorators.py b/python/decorators.py
index 7847b3a2..2deec6d0 100644
--- a/python/decorators.py
+++ b/python/decorators.py
@@ -1,7 +1,7 @@
import _util
import inspect
import dbus_bindings
-
+import new
def method(dbus_interface):
_util._validate_interface_or_name(dbus_interface)
@@ -37,3 +37,6 @@ def signal(dbus_interface):
return decorator
+def explicitly_pass_message(func):
+ func._dbus_pass_message = True
+ return func