Commit 50ce6c5c authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Go back to cwd after running a legacy parser.

parent 2bbada57
......@@ -69,7 +69,8 @@ fs = NomadConfig(
public='.volumes/fs/public',
migration_packages='.volumes/fs/migration_packages',
local_tmp='/tmp',
prefix_size=2
prefix_size=2,
working_directory=os.getcwd()
)
elastic = NomadConfig(
......
......@@ -21,9 +21,10 @@ import inspect
from unittest.mock import patch
import logging
import os.path
import os
import glob
from nomad import utils
from nomad import utils, config
from nomad.parsing.backend import LocalBackend
......@@ -132,6 +133,7 @@ class LegacyParser(Parser):
with patch.object(sys, 'argv', []):
backend = self.parser.parse(mainfile)
os.chdir(config.fs.working_directory)
if backend is None or not hasattr(backend, 'status'):
backend = self.parser.parser_context.super_backend
......
Supports Markdown
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