Skip to content

Commit

Permalink
Merge pull request #793 from XD-DENG/patch-1
Browse files Browse the repository at this point in the history
Fix Type Error Log
  • Loading branch information
argenisleon authored Dec 20, 2019
2 parents 13e7b18 + 959f26b commit dcc632d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions optimus/helpers/raiseit.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from optimus.helpers.converter import one_list_to_val
from optimus.helpers.converter import one_list_to_val, val_to_list


class RaiseIt:
Expand All @@ -8,9 +8,10 @@ def type_error(var, data_types):
"""
Raise a TypeError exception
:param var:
:param data_types: data types expected as strings
:param data_types: data types expected as string or list of strings
:return:
"""
data_types = val_to_list(data_types)

from optimus.helpers.debug import get_var_name
if len(data_types) == 1:
Expand Down

0 comments on commit dcc632d

Please sign in to comment.