Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
robotran
mbsysc
Commits
b18b5f60
Commit
b18b5f60
authored
Aug 14, 2020
by
Louis Beauloye
Browse files
fix bug in equil options
parent
46742860
Changes
2
Hide whitespace changes
Inline
Side-by-side
MBsysC/mbs_interface/MBsysPy/mbsyspy/mbs_dirdyn.py
View file @
b18b5f60
...
...
@@ -852,7 +852,7 @@ class MbsDirdyn(object):
except
AttributeError
as
err
:
# if error during cast of strings (i.e in str_to_bytes)
raise
TypeError
(
"{:} is str,
{:}
can not be casted
.
"
.
format
(
key
,
type
(
value
))).
with_traceback
(
err
.
__traceback__
)
from
None
raise
TypeError
(
"{:} is str, can not be casted
from {:}
"
.
format
(
key
,
type
(
value
))).
with_traceback
(
err
.
__traceback__
)
from
None
except
TypeError
as
err
:
# if wrong type in integrator or compute_QC
...
...
MBsysC/mbs_interface/MBsysPy/mbsyspy/mbs_equil.py
View file @
b18b5f60
...
...
@@ -940,12 +940,12 @@ class MbsEquil(object):
if
key
==
'store_results'
:
self
.
store_results
=
int
(
value
)
else
:
setattr
(
self
.
mbs_
part
_ptr
.
contents
.
options
.
contents
,
c_name
,
options
[
key
][
'convert'
](
value
))
setattr
(
self
.
mbs_
equil
_ptr
.
contents
.
options
.
contents
,
c_name
,
options
[
key
][
'convert'
](
value
))
except
ValueError
as
err
:
raise
TypeError
(
"{:} is {:}, can not be casted from {:}."
.
format
(
key
,
options
[
key
][
'convert'
],
type
(
value
))).
with_traceback
(
err
.
__traceback__
)
from
None
except
AttributeError
as
err
:
# if error during cast of strings (i.e in str_to_bytes)
raise
TypeError
(
"{:} is str,
{:}
can not be casted."
.
format
(
key
,
type
(
value
))).
with_traceback
(
err
.
__traceback__
)
from
None
raise
TypeError
(
"{:} is str, can not be casted
from {:}
."
.
format
(
key
,
type
(
value
))).
with_traceback
(
err
.
__traceback__
)
from
None
def
get_options
(
self
,
*
args
):
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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