This file is indexed.

/usr/lib/python3/dist-packages/gi/overrides/Accounts.py is in gir1.2-accounts-1.0 1.15+14.04.20131126.2-0ubuntu3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
from ..overrides import override
from ..importer import modules
from gi.repository import GObject

Accounts = modules['Accounts']._introspection_module

__all__ = []

def _get_string(self, key, default_value=None):
    value = GObject.Value()
    value.init(GObject.TYPE_STRING)
    if self.get_value(key, value) != Accounts.SettingSource.NONE:
        return value.get_string()
    else:
        return default_value

def _get_int(self, key, default_value=None):
    value = GObject.Value()
    value.init(GObject.TYPE_INT64)
    if self.get_value(key, value) != Accounts.SettingSource.NONE:
        return value.get_int64()
    else:
        return default_value

def _get_bool(self, key, default_value=None):
    value = GObject.Value()
    value.init(GObject.TYPE_BOOLEAN)
    if self.get_value(key, value) != Accounts.SettingSource.NONE:
        return value.get_boolean()
    else:
        return default_value

class Account(Accounts.Account):
    get_string = _get_string
    get_int = _get_int
    get_bool = _get_bool

    def get_settings_iter(self, prefix=''):
        return super(Account, self).get_settings_iter(prefix)

    def get_settings(self, prefix=''):
        itr = self.get_settings_iter(prefix)
        while True:
            success, key, value = itr.next()
            if success:
                yield (key, value)
            else:
                break

    def get_settings_dict(self, prefix=''):
        return dict(self.get_settings(prefix))

    def __eq__(self, other):
        return self.id == other.id
    def __ne__(self, other):
        return self.id != other.id

Account = override(Account)
__all__.append('Account')

class Service(Accounts.Service):
    def __eq__(self, other):
        return self.get_name() == other.get_name()
    def __ne__(self, other):
        return self.get_name() != other.get_name()

Service = override(Service)
__all__.append('Service')

class AccountService(Accounts.AccountService):
    get_string = _get_string
    get_int = _get_int
    get_bool = _get_bool

    def __eq__(self, other):
        return self.get_account() == other.get_account() and \
            self.get_service() == other.get_service()
    def __ne__(self, other):
        return self.get_account() != other.get_account() or \
            self.get_service() != other.get_service()

AccountService = override(AccountService)
__all__.append('AccountService')