fixed refactoring issues in mobility.py, fixed issue with parsing config files in a tuple string format
This commit is contained in:
parent
4d21314798
commit
05ce19b0c0
4 changed files with 24 additions and 15 deletions
|
@ -106,7 +106,9 @@ def maketuplefromstr(s, value_type):
|
|||
:return: tuple from string
|
||||
:rtype: tuple
|
||||
"""
|
||||
return tuple(value_type(i) for i in s.split(","))
|
||||
# remove tuple braces and strip commands and space from all values in the tuple string
|
||||
values = [x.strip("' ") for x in s.strip("(), ").split(",")]
|
||||
return tuple(value_type(i) for i in values)
|
||||
|
||||
|
||||
def mutecall(*args, **kwargs):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue