Fix trove-guestagent startup for redis mangled config cmd

Initially, the mangled command is not set, so the get_value()
returns None which is non-iterable

Change-Id: Id705264a265c8758dd32b3f1c62e3b74e81138b1
This commit is contained in:
Luke Browning 2017-11-20 11:54:54 -06:00
parent 5f458ffc38
commit 68449c89cf
1 changed files with 4 additions and 3 deletions

View File

@ -229,9 +229,10 @@ class RedisApp(object):
"""Get current name of the 'CONFIG' command.
"""
renamed_cmds = self.configuration_manager.get_value('rename-command')
for name_pair in renamed_cmds:
if name_pair[0] == 'CONFIG':
return name_pair[1]
if renamed_cmds:
for name_pair in renamed_cmds:
if name_pair[0] == 'CONFIG':
return name_pair[1]
return None