Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dumux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
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
dumux-repositories
dumux
Commits
34c2513d
Commit
34c2513d
authored
3 years ago
by
Timo Koch
Committed by
Dennis Gläser
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[ci][getpiplineinfo] improve traceback handling
parent
90dd0156
No related branches found
No related tags found
1 merge request
!2644
Feature/continuous master pipeline status
Pipeline
#4729
waiting for manual action
Stage: trigger
Stage: downstream modules
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/util/common.py
+7
-6
7 additions, 6 deletions
bin/util/common.py
with
7 additions
and
6 deletions
bin/util/common.py
+
7
−
6
View file @
34c2513d
...
@@ -2,6 +2,7 @@ import os
...
@@ -2,6 +2,7 @@ import os
import
sys
import
sys
import
functools
import
functools
import
subprocess
import
subprocess
import
traceback
def
getCommandErrorHints
(
command
):
def
getCommandErrorHints
(
command
):
...
@@ -19,19 +20,19 @@ def runCommand(command, suppressTraceBack=False, errorMessage=''):
...
@@ -19,19 +20,19 @@ def runCommand(command, suppressTraceBack=False, errorMessage=''):
shell
=
True
,
check
=
True
,
shell
=
True
,
check
=
True
,
text
=
True
,
capture_output
=
True
).
stdout
text
=
True
,
capture_output
=
True
).
stdout
except
Exception
:
except
Exception
:
eType
,
eValue
,
eTraceback
=
sys
.
exc_info
()
if
suppressTraceBack
:
if
suppressTraceBack
:
sys
.
excepthook
(
Exception
,
Exception
(
errorMessage
),
None
)
traceback
.
print_exception
(
eType
,
eType
(
errorMessage
),
None
)
elif
not
errorMessage
:
elif
errorMessage
:
traceback
.
print_exception
(
eType
,
eType
(
errorMessage
),
eTraceback
)
else
:
print
(
"
An error occurred during subprocess run:
"
)
print
(
"
An error occurred during subprocess run:
"
)
print
(
"
-- command: {}
"
.
format
(
command
))
print
(
"
-- command: {}
"
.
format
(
command
))
print
(
"
-- folder: {}
"
.
format
(
os
.
getcwd
()))
print
(
"
-- folder: {}
"
.
format
(
os
.
getcwd
()))
print
(
"
-- error: {}
"
.
format
(
sys
.
exc_info
()[
1
])
)
traceback
.
print_exception
(
eType
,
eValue
,
eTraceback
)
hints
=
getCommandErrorHints
(
command
)
hints
=
getCommandErrorHints
(
command
)
if
hints
is
not
None
:
if
hints
is
not
None
:
print
(
hints
)
print
(
hints
)
raise
else
:
raise
Exception
(
errorMessage
)
# decorator to call function from within the given path
# decorator to call function from within the given 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