Skip to content
Snippets Groups Projects
Commit 0feea3bb authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Reset the context to reuse over multiple runs.

parent 68b89cde
No related branches found
No related merge requests found
......@@ -130,9 +130,11 @@ H 1 # Species label, number of l-shells
"""
class SiestaContext(object):
def __init__(self):
self.reset()
def reset(self):
self.fname = None # The file that we are parsing
self.dirname = None # Base directory of calculations
#self.parser = None # The parser object
......@@ -671,6 +673,7 @@ class SiestaParser():
logging.info('siesta parser started')
logging.getLogger('nomadcore').setLevel(logging.WARNING)
backend = self.backend_factory(metaInfoEnv)
context.reset()
with patch.object(sys, 'argv', ['<exe>', '--uri', 'nmd://uri', mainfile]):
mainFunction(
mainFileDescription,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment