Unverified Commit 418855e6 authored by peastman's avatar peastman Committed by GitHub
Browse files

Fix errors on Python 3.9 (#2888)

* Fix errors on Python 3.9

* Revert changes to travis builds
parent fce26088
......@@ -235,7 +235,7 @@ class CHeaderGenerator(WrapperGenerator):
shortClassName = stripOpenMMPrefix(className)
typeName = convertOpenMMPrefix(className)
destructorName = '~'+shortClassName
isAbstract = any('virt' in method.attrib and method.attrib['virt'] == 'pure-virtual' for method in classNode.getiterator('memberdef'))
isAbstract = any('virt' in method.attrib and method.attrib['virt'] == 'pure-virtual' for method in classNode.iter('memberdef'))
if not isAbstract:
# Write constructors
......@@ -496,7 +496,7 @@ class CSourceGenerator(WrapperGenerator):
shortClassName = stripOpenMMPrefix(className)
typeName = convertOpenMMPrefix(className)
destructorName = '~'+shortClassName
isAbstract = any('virt' in method.attrib and method.attrib['virt'] == 'pure-virtual' for method in classNode.getiterator('memberdef'))
isAbstract = any('virt' in method.attrib and method.attrib['virt'] == 'pure-virtual' for method in classNode.iter('memberdef'))
if not isAbstract:
# Write constructors
......@@ -959,7 +959,7 @@ class FortranHeaderGenerator(WrapperGenerator):
shortClassName = stripOpenMMPrefix(className)
typeName = convertOpenMMPrefix(className)
destructorName = '~'+shortClassName
isAbstract = any('virt' in method.attrib and method.attrib['virt'] == 'pure-virtual' for method in classNode.getiterator('memberdef'))
isAbstract = any('virt' in method.attrib and method.attrib['virt'] == 'pure-virtual' for method in classNode.iter('memberdef'))
if not isAbstract:
# Write constructors
......@@ -1529,7 +1529,7 @@ class FortranSourceGenerator(WrapperGenerator):
shortClassName = stripOpenMMPrefix(className)
typeName = convertOpenMMPrefix(className)
destructorName = '~'+shortClassName
isAbstract = any('virt' in method.attrib and method.attrib['virt'] == 'pure-virtual' for method in classNode.getiterator('memberdef'))
isAbstract = any('virt' in method.attrib and method.attrib['virt'] == 'pure-virtual' for method in classNode.iter('memberdef'))
if not isAbstract:
# Write constructors
......
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