MCPcopy Index your code
hub / github.com/daviddrysdale/python-phonenumbers / get_true_attrib

Function get_true_attrib

tools/python/buildmetadatafromxml.py:144–150  ·  view source on GitHub ↗
(xtag, aname)

Source from the content-addressed store, hash-verified

142
143
144def get_true_attrib(xtag, aname):
145 if aname in xtag.attrib:
146 if xtag.attrib[aname] != 'true':
147 raise Exception("Unexpected value %s for %s attribute" % (xtag.attrib[aname], aname))
148 return True
149 else:
150 return False
151
152
153def get_optional_true_attrib(xtag, aname):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected