Made code for fix more concise

This commit is contained in:
Roan Rothrock 2023-03-29 21:19:24 -05:00
parent 069740139c
commit 9bf1ac7b01

View File

@ -996,7 +996,7 @@ def _setPostprocessFunctions():
for name, function in inspect.getmembers(module, inspect.isfunction):
try:
argspec = inspect.getargspec(function).args
except: # `inspect.getargspec` was removed in PY 3.11
except AttributeError: # `inspect.getargspec` was removed in PY 3.11
argspec = inspect.getfullargspec(function).args
if name == "postprocess" and argspec and all(_ in inspect.getargspec(function).args for _ in ("page", "headers", "code")):
found = True