Ticket: CM-14351
Reviewed By: dwalton
Testing Done:attempts to run NCLU test failed, Daniel verified.
Uninit variable bug, plus missed adding ValueError to the except
clauses in a couple of places.
Signed-off-by: Dinesh Dutt <ddutt@cumulusnetworks.com>
IPNetwork(addr).prefixlen)
except ValueError:
newaddr = addr
+ else:
+ newaddr = addr
legestr = re_key_rt.group(5)
re_lege = re.search(r'(.*)le\s+(\d+)\s+ge\s+(\d+)(.*)', legestr)
newaddr.prefixlen,
re_net.group(2))
newlines.append(line)
- except:
+ except ValueError:
# Really this should be an error. Whats a network
# without an IP Address following it ?
newlines.append(line)
if not norm_word:
try:
norm_word = '%s' % IPv6Address(word)
- except:
+ except ValueError:
norm_word = word
else:
norm_word = word