restructuring and removing HEConfig
This commit is contained in:
10
utils/he_ipv6/utils.py
Normal file
10
utils/he_ipv6/utils.py
Normal file
@@ -0,0 +1,10 @@
|
||||
def xml2bool(xml_str):
|
||||
if xml_str is None:
|
||||
return(None)
|
||||
xml_str = xml_str.lower()[0]
|
||||
if xml_str in ('t', '1'):
|
||||
return(True)
|
||||
elif xml_str in ('f', '0'):
|
||||
return(False)
|
||||
else:
|
||||
raise ValueError('Not a boolean value')
|
||||
Reference in New Issue
Block a user