From ac6616afd6016ed5e47ba1aaab62993471ed66fa Mon Sep 17 00:00:00 2001 From: lilydjwg Date: Sun, 13 Aug 2017 18:49:36 +0800 Subject: [PATCH] fix get_version returning None --- nvchecker/get_version.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nvchecker/get_version.py b/nvchecker/get_version.py index c2efa94..8a94d23 100644 --- a/nvchecker/get_version.py +++ b/nvchecker/get_version.py @@ -18,6 +18,8 @@ async def get_version(name, conf): if key in conf: func = import_module('.source.' + key, __package__).get_version version = await func(name, conf) - return version.replace('\n', ' ') + if version: + version.replace('\n', ' ') + return version else: logger.error('%s: no idea to get version info.', name)