From c00d5c75953c724f301b99da16b0fbeb289a5ef1 Mon Sep 17 00:00:00 2001 From: Jossef Harush Date: Mon, 5 Oct 2020 23:52:30 +0300 Subject: [PATCH] fix(deprecations.py): fix for cases result is None closes #423 --- tlslite/utils/deprecations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tlslite/utils/deprecations.py b/tlslite/utils/deprecations.py index b5a9175c0..eaee8ab74 100644 --- a/tlslite/utils/deprecations.py +++ b/tlslite/utils/deprecations.py @@ -41,7 +41,7 @@ def _func(*args, **kwargs): # isinstance(old_name(), new_name) to work frame = inspect.currentframe().f_back code = inspect.getframeinfo(frame).code_context - if [line for line in code + if code and [line for line in code if '{0}('.format(old_name) in line]: _warn() else: