Unverified Commit b57a5a63 authored by Han Y.B's avatar Han Y.B Committed by GitHub
Browse files

fix: py Interface omit errors in xml attributes. (#3928)

parent 42127197
......@@ -3495,14 +3495,11 @@ class AmoebaAngleGenerator(object):
angleList = []
angleList.append(float(angle.attrib['angle1']))
try:
if 'angle2' in angle.attrib:
angleList.append(float(angle.attrib['angle2']))
try:
if 'angle3' in angle.attrib:
angleList.append(float(angle.attrib['angle3']))
except:
pass
except:
pass
generator.angle.append(angleList)
generator.k.append(float(angle.attrib['k']))
if 'inPlane' in angle.attrib:
......@@ -4967,11 +4964,7 @@ class AmoebaMultipoleGenerator(object):
kStrings = [ 'kz', 'kx', 'ky' ]
for kString in kStrings:
try:
if (atom.attrib[kString]):
kIndices.append(int(atom.attrib[kString]))
except:
pass
kIndices.append(int(atom.attrib.get(kString,0)))
# set axis type based on k-Indices
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment