Skip to content

Commit

Permalink
Adds PY2 support back for PY3 deprecated function getargspec.
Browse files Browse the repository at this point in the history
  • Loading branch information
fergyfresh authored Jul 9, 2018
1 parent 877d4e0 commit 2333211
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion flask_ask/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,12 @@ def _map_intent_to_view_func(self, intent):
else:
raise NotImplementedError('Intent "{}" not found and no default intent specified.'.format(intent.name))

argspec = inspect.getfullargspec(view_func)
PY3 = sys.version_info[0] == 3
if PY3:
argspec = inspect.getfullargspec(view_func)
else:
argspec = inspect.getargspec(view_func)

arg_names = argspec.args
arg_values = self._map_params_to_view_args(intent.name, arg_names)

Expand Down

0 comments on commit 2333211

Please sign in to comment.