Update match groups

This commit is contained in:
Neil Booth 2017-02-17 21:42:34 +09:00
parent 4dcd7f25a5
commit 251dca4da9

View File

@ -70,7 +70,7 @@ class Coin(object):
match = cls.RPC_URL_REGEX.match(url)
if not match:
raise CoinError('invalid daemon URL: "{}"'.format(url))
if match.groups()[0] is None:
if match.groups()[1] is None:
url += ':{:d}'.format(cls.RPC_PORT)
if not url.startswith('http://'):
url = 'http://' + url