Skip to content

Commit

Permalink
remove paranthesis and print log
Browse files Browse the repository at this point in the history
  • Loading branch information
AHReccese committed Jun 18, 2023
1 parent e280126 commit 1fb7070
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions nava/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,19 +105,18 @@ def inner_function(*args, **kwargs):
:type kwargs: dict
:return: modified function result
"""
if("sound_path" in kwargs.keys()):
if "sound_path" in kwargs.keys():
sound_path = kwargs["sound_path"]
elif(len(args) >= 1):
elif len(args) >= 1:
sound_path = args[0]
else:
raise NavaBaseError(SOUND_FILE_PATH_NOT_GIVEN)

if not (isinstance(sound_path, str)):
if not isinstance(sound_path, str):
raise NavaBaseError(SOUND_FILE_PATH_TYPE_ERROR)

print(sound_path)

# check sound file existance
if not (os.path.isfile(sound_path)):
if not os.path.isfile(sound_path):
raise NavaBaseError(SOUND_FILE_EXIST_ERROR)
return func(*args, **kwargs)
return inner_function
Expand Down

0 comments on commit 1fb7070

Please sign in to comment.