Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Markus Holzer
waLBerla
Commits
a399eded
Commit
a399eded
authored
Sep 10, 2019
by
Matthias Markl
Committed by
Michael Kuron
Sep 25, 2019
Browse files
bug fix in pint_unit_converter.py
parent
f1903a70
Changes
1
Hide whitespace changes
Inline
Side-by-side
python/waLBerla/tools/lbm_unitconversion/pint_unit_converter.py
View file @
a399eded
...
...
@@ -113,12 +113,12 @@ class PintUnitConverter:
elif
type
(
value
)
is
tuple
:
try
:
result
[
key
]
=
tuple
(
[
self
.
ureg
.
Quantity
(
e
)
for
e
in
value
]
)
except
(
pint
.
unit
.
UndefinedUnitError
,
ValueError
,
TypeError
):
except
(
pint
.
UndefinedUnitError
,
ValueError
,
TypeError
):
result
[
key
]
=
value
else
:
try
:
result
[
key
]
=
self
.
ureg
.
Quantity
(
value
)
except
(
pint
.
unit
.
UndefinedUnitError
,
ValueError
,
TypeError
):
except
(
pint
.
UndefinedUnitError
,
ValueError
,
TypeError
):
result
[
key
]
=
value
return
result
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment