~phablet-team/telepathy-ofono/legacy

« back to all changes in this revision

Viewing changes to tpofono/handle.py

Fix python errors reported by pyflakes and pep8. Fixes: https://bugs.launchpad.net/bugs/1124783.

Approved by Renato Araujo Oliveira Filho, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
logger = logging.getLogger('oFono.Handle')
27
27
 
 
28
 
28
29
def oFonoHandleFactory(connection, type, id, name, **kwargs):
29
30
    mapping = {telepathy.HANDLE_TYPE_CONTACT: oFonoContactHandle}
30
31
    handle = mapping[type](connection, id, name, **kwargs)
38
39
        self._conn = weakref.proxy(connection)
39
40
 
40
41
    def __unicode__(self):
41
 
        type_mapping = {telepathy.HANDLE_TYPE_CONTACT : 'Contact'}
 
42
        type_mapping = {telepathy.HANDLE_TYPE_CONTACT: 'Contact'}
42
43
        type_str = type_mapping.get(self.type, '')
43
44
        return "<oFono%sHandle id=%u name='%s'>" % \
44
45
            (type_str, self.id, self.name)
56
57
    @property
57
58
    def contact(self):
58
59
        return self._contact
59