fix get_version returning None

This commit is contained in:
lilydjwg 2017-08-13 18:49:36 +08:00
parent f98ef68949
commit ac6616afd6
1 changed files with 3 additions and 1 deletions

View File

@ -18,6 +18,8 @@ async def get_version(name, conf):
if key in conf: if key in conf:
func = import_module('.source.' + key, __package__).get_version func = import_module('.source.' + key, __package__).get_version
version = await func(name, conf) version = await func(name, conf)
return version.replace('\n', ' ') if version:
version.replace('\n', ' ')
return version
else: else:
logger.error('%s: no idea to get version info.', name) logger.error('%s: no idea to get version info.', name)