Commit ac492887 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

utils.OwnIpAddress: Change try/except for Python 2.4



Python 2.4 doesn't support “except” and “finally” in the same block.
Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 2a7c3583
......@@ -1806,6 +1806,7 @@ def OwnIpAddress(address):
family = GetAddressFamily(address)
s = socket.socket(family, socket.SOCK_DGRAM)
success = False
try:
try:
s.bind((address, 0))
success = True
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment