Commit a78fb2d9 authored by Sriram Karra's avatar Sriram Karra

Bugfix: Handle OL entries without address property without raising exception

parent 84122457
...@@ -533,11 +533,14 @@ class OLContact(Contact): ...@@ -533,11 +533,14 @@ class OLContact(Contact):
## when the custom property is read and parsed ## when the custom property is read and parsed
addrs = self.get_custom('addrs') addrs = self.get_custom('addrs')
if not addrs:
return
try: try:
prim_label = addrs['_prim_addr_label'] prim_label = addrs['_prim_addr_label']
except KeyError, e: except KeyError, e:
logging.debug('OL Contact %s does not have _prim_addr_label', logging.debug('OL Contact %s does not have _prim_addr_label',
self.get_name()) self.get_disp_name())
prim_label = 'Home' prim_label = 'Home'
## First deal with all the directly available addresses ## First deal with all the directly available addresses
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment