Log warning and continue on invalid port specification. Fixes traceback from https://trello.com/c/0OgJ3uRb

This commit is contained in:
Chris Church
2014-12-03 19:27:52 -05:00
parent 526e4f2a2c
commit 6b91f46082
2 changed files with 35 additions and 1 deletions

View File

@@ -184,7 +184,12 @@ class BaseLoader(object):
port = int(m.groups()[1])
elif name.count(':') == 1:
host_name = name.split(':')[0]
port = int(name.split(':')[1])
try:
port = int(name.split(':')[1])
except (ValueError, UnicodeDecodeError):
logger.warning(u'Invalid port "%s" for host "%s"',
name.split(':')[1], host_name)
port = None
else:
host_name = name
port = None