Skip to content

Commit

Permalink
Merge 8043590 into 9951378
Browse files Browse the repository at this point in the history
  • Loading branch information
OrangeTux committed Dec 4, 2019
2 parents 9951378 + 8043590 commit 0bd7573
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions umodbus/functions.py
Expand Up @@ -57,8 +57,15 @@
"""
from __future__ import division
import struct
import inspect
import math

try:
from inspect import getfullargspec
except ImportError:
# inspect.getfullargspec was introduced in Python 3.4.
# Earlier versions have inspect.getargspec.
from inspect import getargspec as getfullargspec

try:
from functools import reduce
except ImportError:
Expand Down Expand Up @@ -126,7 +133,7 @@ def create_function_from_response_pdu(resp_pdu, req_pdu=None):
function = function_code_to_function_map[function_code]

if req_pdu is not None and \
'req_pdu' in inspect.getargspec(function.create_from_response_pdu).args: # NOQA
'req_pdu' in getfullargspec(function.create_from_response_pdu).args: # NOQA

return function.create_from_response_pdu(resp_pdu, req_pdu)

Expand Down

0 comments on commit 0bd7573

Please sign in to comment.