From 75cb6f55042f35ad3da894bc2f6984eb8963e007 Mon Sep 17 00:00:00 2001 From: zhangchunle Date: Thu, 7 May 2020 13:22:09 +0800 Subject: [PATCH] fix a bug in tools/sampcd_processor.py (#24325) --- tools/sampcd_processor.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/sampcd_processor.py b/tools/sampcd_processor.py index c2dfecdfbb..086a36c3a8 100644 --- a/tools/sampcd_processor.py +++ b/tools/sampcd_processor.py @@ -478,10 +478,11 @@ def get_filenames(): filename = filename + module_py else: filename = '' - print("\n----Exception in get api filename----\n") + print("\nWARNING:----Exception in get api filename----\n") print("\n" + api + ' module is ' + module + "\n") - if filename not in filenames: - filenames.append(filename) + if filename != '': + if filename not in filenames: + filenames.append(filename) # get all methods method = '' if inspect.isclass(eval(api)): @@ -492,7 +493,7 @@ def get_filenames(): name = '%s.%s' % (api.split('.')[-2], api.split('.')[-1]) else: name = '' - print("\n----Exception in get api methods----\n") + print("\nWARNING:----Exception in get api methods----\n") print("\n" + line + "\n") print("\n" + api + ' method is None!!!' + "\n") for j in range(2, len(module.split('.'))): -- GitLab