2015-10-06 | Paul Boddie | raw files shortlog changelog graph | Fixed verbose address construction for empty addresses. | |
imiptools/data.py (file) |
1.1 --- a/imiptools/data.py Mon Oct 05 23:56:48 2015 +0200 1.2 +++ b/imiptools/data.py Tue Oct 06 00:03:42 2015 +0200 1.3 @@ -769,7 +769,10 @@ 1.4 and any accompanying 'attr' dictionary. 1.5 """ 1.6 1.7 - name, address = get_address_parts([value])[0] 1.8 + l = get_address_parts([value]) 1.9 + if not l: 1.10 + return value 1.11 + name, address = l[0] 1.12 if not name: 1.13 name = attr and attr.get("CN") 1.14 if name and address: