diff options
author | Xavier Claessens <xclaesse@gmail.com> | 2011-08-05 11:04:58 +0200 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2011-08-05 11:19:06 +0200 |
commit | 06acc6e3ff8a391bb99607716271b499f41b27f5 (patch) | |
tree | 8d3ff022ca0b95d716ae5ec698e140917afd649e /examples/client/python/contact-list.py | |
parent | 319f8960b8969df0251671a7433dbc0689ebd0fd (diff) |
contact-list examples: verify state is SUCCESS before getting the contact list
Diffstat (limited to 'examples/client/python/contact-list.py')
-rwxr-xr-x | examples/client/python/contact-list.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/client/python/contact-list.py b/examples/client/python/contact-list.py index 8549a4ed7..6a0b331b1 100755 --- a/examples/client/python/contact-list.py +++ b/examples/client/python/contact-list.py @@ -11,7 +11,8 @@ def manager_prepared_cb(manager, result, loop): for account in manager.get_valid_accounts(): connection = account.get_connection() - if connection is not None: + if connection is not None and \ + connection.get_contact_list_state() == TelepathyGLib.ContactListState.SUCCESS: contacts = connection.dup_contact_list() for contact in contacts: print "%s (%s)" % (contact.get_identifier(), contact.get_contact_groups()) |