X-Git-Url: http://git.maemo.org/git/?p=theonering;a=blobdiff_plain;f=src%2Faliasing.py;h=96c4dc310f3e807b2d15ea7690cff3aad122acfc;hp=cd107abb742180dd284c8a74aebded3d6c933747;hb=ac08a8171fb00beff39b5f5268b768fd4a85773d;hpb=6ef9231c94a33ecc288d5927d0c8e22917be7f0f diff --git a/src/aliasing.py b/src/aliasing.py index cd107ab..96c4dc3 100644 --- a/src/aliasing.py +++ b/src/aliasing.py @@ -101,7 +101,14 @@ class AliasingMixin(tp.ConnectionInterfaceAliasing): """ raise NotImplementedError("Abstract property called") - def handle(self, handleType, handleId): + @property + def callbackNumberParameter(self): + """ + @abstract + """ + raise NotImplementedError("Abstract property called") + + def get_handle_by_id(self, handleType, handleId): """ @abstract """ @@ -160,8 +167,8 @@ class AliasingMixin(tp.ConnectionInterfaceAliasing): return userAlias else: number = h.phoneNumber - if number: + try: contactAlias = self.session.addressbook.get_contact_name(number) - else: + except KeyError: contactAlias = make_pretty(number) return contactAlias