2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-12-25 04:32:11 +00:00

Do not inject 'None' into builddesc

If such data came from remote system, do not cause a stack trace.
This commit is contained in:
Jarrod Johnson 2018-11-05 10:43:36 -05:00
parent 43fb4467b7
commit 37899ad39e

View File

@ -37,14 +37,14 @@ exitcode = 0
def printfirm(node, prefix, data):
if 'model' in data:
if 'model' in data and data['model']:
prefix += ' ' + data['model']
builddesc = []
if 'build' in data:
if 'build' in data and data['build']:
builddesc.append(data['build'])
if 'date' in data:
if 'date' in data and data['date']:
builddesc.append(data['date'])
if 'version' in data:
if 'version' in data and data['version']:
version = data['version']
if builddesc:
version += ' ({0})'.format(' '.join(builddesc))