Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-8122

cbcollect_info with python2.4 : finally: SyntaxError: invalid syntax

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.1.0
    • Component/s: tools
    • Security Level: Public
    • Labels:
      None
    • Environment:
      centos-32

      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()

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            • Assignee:
              andreibaranouski Andrei Baranouski
              Reporter:
              andreibaranouski Andrei Baranouski
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes