Catch invalid network names in IdentityFromString/LinkAccounts

This commit is contained in:
moneromooo 2015-02-07 10:01:13 +00:00
parent 3e88744e3b
commit db727c9329
2 changed files with 8 additions and 1 deletions

View file

@ -381,6 +381,9 @@ def IdentityFromString(link,s):
parts=s.split(':')
network_name=parts[0]
network=GetNetworkByName(network_name)
if not network:
log_error('unknown network: %s' % network_name)
raise RuntimeError('Unknown network: %s' % network_name)
nick=parts[1]
return network.name+':'+network.canonicalize(nick)