Ubuntu Pastebin

Paste from veebers at Mon, 23 Feb 2015 03:12:06 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
s:      @classmethod
    def validate_dbus_object(cls, path, _state):
        """Return whether this class is the appropriate proxy object class for
        a given dbus path and state.

        The default version matches the name of the dbus object and the class.
        Subclasses of CustomProxyObject can override it to define a different
        validation method.

        :param path: The dbus path of the object to check
        :param state: The dbus state dict of the object to check
                      (ignored in default implementation)
        :returns: Whether this class is appropriate for the dbus object

        """
        state_name = xpathselect.get_classname_from_path(path)
        if isinstance(state_name, str):
            state_name = state_name.encode('utf-8')
        class_name = cls.__name__.encode('utf-8')
        return state_name == class_name

b:  (<class 'address_book_app.pages._common.PageWithHeader'>, <class 'address_book_app.pages._common.PageWithBottomEdge'>)
s:      @classmethod
    def validate_dbus_object(cls, path, state):
        name = introspection.get_classname_from_path(path)
        return (name == b'webbrowser-app' and
                state['applicationName'][1] == 'webbrowser-app')

b:  (<class 'address_book_app.AddressBookApp'>, <class 'address_book_app.pages._common.PageWithBottomEdge'>, <class 'autopilot.introspection.qt.QtObjectProxyMixin'>, <class 'address_book_app.pages._common.PageWithHeader'>)
s:      @classmethod
    def validate_dbus_object(cls, path, state):
        name = introspection.get_classname_from_path(path)
        return (name == b'webbrowser-app' and
                state['applicationName'][1] == 'webbrowser-app')

b:  (<class 'address_book_app.AddressBookApp'>, <class 'address_book_app.pages._common.PageWithBottomEdge'>, <class 'autopilot.introspection.qt.QtObjectProxyMixin'>, <class 'address_book_app.pages._common.PageWithHeader'>)
Download as text