~ubuntu-branches/ubuntu/precise/landscape-client/precise

« back to all changes in this revision

Viewing changes to landscape/monitor/plugin.py

  • Committer: Package Import Robot
  • Author(s): Andreas Hasenack
  • Date: 2012-03-19 09:33:34 UTC
  • mto: This revision was merged to the branch mainline in revision 41.
  • Revision ID: package-import@ubuntu.com-20120319093334-oxjttz163vvfgq8s
Tags: upstream-12.04
ImportĀ upstreamĀ versionĀ 12.04

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
        """An alias for the C{client} attribute."""
37
37
        return self.client
38
38
 
39
 
    def call_on_accepted(self, type, callable, *args, **kwargs):
40
 
        """
41
 
        Register a callback fired upon a C{message-type-acceptance-changed}.
42
 
        """
43
 
 
44
 
        def acceptance_changed(acceptance):
45
 
            if acceptance:
46
 
                return callable(*args, **kwargs)
47
 
 
48
 
        self.monitor.reactor.call_on(("message-type-acceptance-changed",
49
 
                                       type), acceptance_changed)
50
 
 
51
39
 
52
40
class DataWatcher(MonitorPlugin):
53
41
    """