Description
http://qa.hq.northscale.net/job/centos-32-2.0-swaprebalance-tests/358/consoleFull
[2013-04-17 02:37:56,732] - [remote_util:1264] INFO - running command.raw /opt/couchbase/bin/cbcollect_info 10.3.2.148-4172013-237-diag.zip
[2013-04-17 02:37:56,868] - [remote_util:1293] INFO - command executed successfully
[2013-04-17 02:37:56,869] - [remote_util:1241] INFO - File "/opt/couchbase/bin/cbcollect_info", line 481
[2013-04-17 02:37:56,869] - [remote_util:1241] INFO - finally:
[2013-04-17 02:37:56,869] - [remote_util:1241] INFO - ^
[2013-04-17 02:37:56,870] - [remote_util:1241] INFO - SyntaxError: invalid syntax
File "/opt/couchbase/bin/cbcollect_info", line 481
finally:
^
SyntaxError: invalid syntax
try:
except:
finally: was added in 2.5
we can wrap try except in a try finally, like as
def find_primary_addr(default = None):
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
try:
try:
s.connect(("8.8.8.8", 56))
addr, port = s.getsockname()
return addr
except socket.error:
return default
finally:
s.close()