Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nomad-FAIR
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nomad-lab
nomad-FAIR
Commits
50ce6c5c
Commit
50ce6c5c
authored
6 years ago
by
Markus Scheidgen
Browse files
Options
Downloads
Patches
Plain Diff
Go back to cwd after running a legacy parser.
parent
2bbada57
No related branches found
No related tags found
1 merge request
!39
Migration
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
nomad/config.py
+2
-1
2 additions, 1 deletion
nomad/config.py
nomad/parsing/parser.py
+3
-1
3 additions, 1 deletion
nomad/parsing/parser.py
with
5 additions
and
2 deletions
nomad/config.py
+
2
−
1
View file @
50ce6c5c
...
@@ -69,7 +69,8 @@ fs = NomadConfig(
...
@@ -69,7 +69,8 @@ fs = NomadConfig(
public
=
'
.volumes/fs/public
'
,
public
=
'
.volumes/fs/public
'
,
migration_packages
=
'
.volumes/fs/migration_packages
'
,
migration_packages
=
'
.volumes/fs/migration_packages
'
,
local_tmp
=
'
/tmp
'
,
local_tmp
=
'
/tmp
'
,
prefix_size
=
2
prefix_size
=
2
,
working_directory
=
os
.
getcwd
()
)
)
elastic
=
NomadConfig
(
elastic
=
NomadConfig
(
...
...
This diff is collapsed.
Click to expand it.
nomad/parsing/parser.py
+
3
−
1
View file @
50ce6c5c
...
@@ -21,9 +21,10 @@ import inspect
...
@@ -21,9 +21,10 @@ import inspect
from
unittest.mock
import
patch
from
unittest.mock
import
patch
import
logging
import
logging
import
os.path
import
os.path
import
os
import
glob
import
glob
from
nomad
import
utils
from
nomad
import
utils
,
config
from
nomad.parsing.backend
import
LocalBackend
from
nomad.parsing.backend
import
LocalBackend
...
@@ -132,6 +133,7 @@ class LegacyParser(Parser):
...
@@ -132,6 +133,7 @@ class LegacyParser(Parser):
with
patch
.
object
(
sys
,
'
argv
'
,
[]):
with
patch
.
object
(
sys
,
'
argv
'
,
[]):
backend
=
self
.
parser
.
parse
(
mainfile
)
backend
=
self
.
parser
.
parse
(
mainfile
)
os
.
chdir
(
config
.
fs
.
working_directory
)
if
backend
is
None
or
not
hasattr
(
backend
,
'
status
'
):
if
backend
is
None
or
not
hasattr
(
backend
,
'
status
'
):
backend
=
self
.
parser
.
parser_context
.
super_backend
backend
=
self
.
parser
.
parser_context
.
super_backend
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment