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
Dominik Mehlich
waLBerla
Commits
372f26f4
Commit
372f26f4
authored
Sep 10, 2019
by
Matthias Markl
Browse files
bug fix in pint_unit_converter.py
parent
1969d023
Changes
1
Hide whitespace changes
Inline
Side-by-side
python/waLBerla/tools/lbm_unitconversion/pint_unit_converter.py
View file @
372f26f4
...
...
@@ -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