Detect values of None in utils.get_irc()
The intent for the get_irc() function is to return an empty string when no nick is found, but the API tends to provide a null (None) value explicitly. When this happens, convert it to the empty string too. Change-Id: I9b62b1d722136246d1987a1a45ca771bdc02579c
This commit is contained in:
parent
ebcd45e865
commit
c48852e3bb
@ -178,6 +178,9 @@ def get_irc(member, filepath=None):
|
|||||||
member_data = member.get('data', [])
|
member_data = member.get('data', [])
|
||||||
if member_data:
|
if member_data:
|
||||||
irc = member_data[0].get('irc', '')
|
irc = member_data[0].get('irc', '')
|
||||||
|
# The API can return None for nonexistent nicks
|
||||||
|
if irc is None:
|
||||||
|
irc = ''
|
||||||
return irc
|
return irc
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user