File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 5757"""
5858from __future__ import division
5959import struct
60- import inspect
6160import math
61+
62+ try :
63+ from inspect import getfullargspec
64+ except ImportError :
65+ # inspect.getfullargspec was introduced in Python 3.4.
66+ # Earlier versions have inspect.getargspec.
67+ from inspect import getargspec as getfullargspec
68+
6269try :
6370 from functools import reduce
6471except ImportError :
@@ -126,7 +133,7 @@ def create_function_from_response_pdu(resp_pdu, req_pdu=None):
126133 function = function_code_to_function_map [function_code ]
127134
128135 if req_pdu is not None and \
129- 'req_pdu' in inspect . getargspec (function .create_from_response_pdu ).args : # NOQA
136+ 'req_pdu' in getfullargspec (function .create_from_response_pdu ).args : # NOQA
130137
131138 return function .create_from_response_pdu (resp_pdu , req_pdu )
132139
You can’t perform that action at this time.
0 commit comments