Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
nomad-FAIR
Commits
50ce6c5c
Commit
50ce6c5c
authored
Mar 29, 2019
by
Markus Scheidgen
Browse files
Go back to cwd after running a legacy parser.
parent
2bbada57
Changes
2
Hide whitespace changes
Inline
Side-by-side
nomad/config.py
View file @
50ce6c5c
...
...
@@ -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
(
...
...
nomad/parsing/parser.py
View file @
50ce6c5c
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment