diff --git a/utils/jncdevice.py b/utils/jncdevice.py index ad10a41203f8616f080a11bbb81c7aa854bc9d62..571d92de535e0a1a5dbd5e708c966f78c4ade54f 100644 --- a/utils/jncdevice.py +++ b/utils/jncdevice.py @@ -542,6 +542,12 @@ class Route(object): grandChildName_ = Tag_pattern_.match(grandChild_.tag).groups()[-1] grandChildText = grandChild_.text grandChildText = re_.sub(STRING_CLEANUP_PAT, " ", grandChildText).strip() + if grandChildText=="" and (grandChildName_=="destination" or grandChildName_=="source"): + for grandgrandChild_ in grandChild_: + grandgrandChildName_ = Tag_pattern_.match(grandgrandChild_.tag).groups()[-1] + if grandgrandChildName_=="prefix": + grandChildText = grandgrandChild_.text + grandChildText = re_.sub(STRING_CLEANUP_PAT, " ", grandChildText).strip() self.match[grandChildName_].append(grandChildText) elif nodeName_ == 'then': for grandChild_ in child_: