Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
ArchiveExtractor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
DG
ArchiveExtractor
Commits
297c2ff2
Commit
297c2ff2
authored
1 year ago
by
BRONES Romain
Browse files
Options
Downloads
Patches
Plain Diff
fix: Add traceback print when catching exception
Easier to debug
parent
1113baff
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ArchiveExtractor.py
+7
-3
7 additions, 3 deletions
ArchiveExtractor.py
with
7 additions
and
3 deletions
ArchiveExtractor.py
+
7
−
3
View file @
297c2ff2
...
...
@@ -6,6 +6,7 @@ import datetime
import
numpy
as
np
import
PyTango
as
tango
import
pandas
as
pd
import
traceback
__version__
=
"
1.0.1
"
...
...
@@ -383,7 +384,8 @@ def extract(
try
:
d
.
update
({
k
:
_extract_attribute
(
v
,
method
,
date1
,
date2
,
db
)})
except
Exception
as
e
:
logger
.
debug
(
str
(
e
))
logger
.
debug
(
"
Exception in _extract_attribute():
"
+
str
(
e
))
logger
.
debug
(
traceback
.
print_tb
(
e
.
__traceback__
))
logger
.
error
(
"
Could not extract {}.
"
.
format
(
v
))
return
d
...
...
@@ -394,7 +396,8 @@ def extract(
try
:
d
.
append
(
_extract_attribute
(
v
,
method
,
date1
,
date2
,
db
))
except
Exception
as
e
:
logger
.
debug
(
str
(
e
))
logger
.
debug
(
"
Exception in _extract_attribute():
"
+
str
(
e
))
logger
.
debug
(
traceback
.
print_tb
(
e
.
__traceback__
))
logger
.
error
(
"
Could not extract {}.
"
.
format
(
v
))
return
d
...
...
@@ -402,7 +405,8 @@ def extract(
try
:
d
=
_extract_attribute
(
attr
,
method
,
date1
,
date2
,
db
)
except
Exception
as
e
:
logger
.
debug
(
str
(
e
))
logger
.
debug
(
"
Exception in _extract_attribute():
"
+
str
(
e
))
logger
.
debug
(
traceback
.
print_tb
(
e
.
__traceback__
))
logger
.
error
(
"
Could not extract {}.
"
.
format
(
attr
))
return
None
...
...
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