Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
PeTrack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pedestrian Dynamics Empiricism
PeTrack
Commits
50970130
Commit
50970130
authored
4 months ago
by
Simon Hermanns
Browse files
Options
Downloads
Patches
Plain Diff
Catched exception from subprocess
parent
39a73db0
No related branches found
No related tags found
1 merge request
!383
Resolve "Delete `fix` in path-options of tracking"
Pipeline
#170956
passed
4 months ago
Stage: docs
Stage: pre-build-checks
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/update_pet_files.py
+16
-6
16 additions, 6 deletions
scripts/update_pet_files.py
with
16 additions
and
6 deletions
scripts/update_pet_files.py
+
16
−
6
View file @
50970130
...
...
@@ -18,13 +18,23 @@ pet_files = []
def
open_pet_file
(
pet_file
:
str
,
build_dir
:
str
)
->
None
:
process
=
subprocess
.
run
([
f
"
{
build_dir
}
/petrack
"
,
"
-project
"
,
pet_file
,
"
-autoSave
"
,
pet_file
,
"
-platform
"
,
"
offscreen
"
])
if
process
.
returncode
!=
0
:
# try calling petrack.exe
process
=
subprocess
.
Popen
([
"
petrack.exe
"
,
"
-project
"
,
pet_file
,
"
-autoSave
"
,
pet_file
])
if
process
.
returncode
!=
0
:
print
(
"
Cannot open petrack. Check if you have given the right build dir or if petrack is in your PATH
"
)
executables
=
[
f
"
{
build_dir
}
/petrack
"
,
"
petrack.exe
"
"
petrack
"
]
for
exe
in
executables
:
try
:
process
=
subprocess
.
run
([
exe
,
"
-project
"
,
pet_file
,
"
-autoSave
"
,
pet_file
,
"
-platform
"
,
"
offscreen
"
],
check
=
True
)
return
except
FileNotFoundError
:
continue
# try next executable
except
subprocess
.
CalledProcessError
as
e
:
print
(
f
"
Error executing
{
exe
}
:
{
e
.
stderr
}
"
)
return
print
(
"
No petrack executable found. Ensure you provided the correct build directory or if petrack is in your path
"
)
...
...
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