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

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

        Activity

        Hide
        maria Maria McDuff (Inactive) added a comment -

        per aliaksey, this is fixed. resolving. will re-open if the fix is not merged.

        Show
        maria Maria McDuff (Inactive) added a comment - per aliaksey, this is fixed. resolving. will re-open if the fix is not merged.
        Hide
        maria Maria McDuff (Inactive) added a comment -

        pls verify /close.

        Show
        maria Maria McDuff (Inactive) added a comment - pls verify /close.
        Hide
        andreibaranouski Andrei Baranouski added a comment -

        works:
        [root@cen-0725 ~]# /opt/couchbase/bin/cbcollect_info 10.3.2.148-4172013-237-diag.zip
        uname (uname -a) - OK
        Directory structure membase - previous versions (ls -lR /opt/membase /var/membase /var/opt/membase /etc/opt/membase) - Exit code 2
        Process list snapshot (export TERM=''; top -Hb -n1 || top -H n1) - OK
        Process list (ps -AwwL -o user,pid,lwp,ppid,nlwp,pcpu,maj_flt,min_flt,pri,nice,vsize,rss,tty,stat,wchan:12,start,bsdtime,command) - OK
        Raw /proc/vmstat (cat /proc/vmstat) - OK
        Raw /proc/mounts (cat /proc/mounts) - OK
        Raw /proc/partitions (cat /proc/partitions) - OK

        Show
        andreibaranouski Andrei Baranouski added a comment - works: [root@cen-0725 ~] # /opt/couchbase/bin/cbcollect_info 10.3.2.148-4172013-237-diag.zip uname (uname -a) - OK Directory structure membase - previous versions (ls -lR /opt/membase /var/membase /var/opt/membase /etc/opt/membase) - Exit code 2 Process list snapshot (export TERM=''; top -Hb -n1 || top -H n1) - OK Process list (ps -AwwL -o user,pid,lwp,ppid,nlwp,pcpu,maj_flt,min_flt,pri,nice,vsize,rss,tty,stat,wchan:12,start,bsdtime,command) - OK Raw /proc/vmstat (cat /proc/vmstat) - OK Raw /proc/mounts (cat /proc/mounts) - OK Raw /proc/partitions (cat /proc/partitions) - OK

          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