From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46808) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPIlc-0000s6-Sg for qemu-devel@nongnu.org; Tue, 01 May 2012 15:29:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SPIlb-00057b-1k for qemu-devel@nongnu.org; Tue, 01 May 2012 15:29:44 -0400 Received: from e06smtp14.uk.ibm.com ([195.75.94.110]:51261) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPIla-00057C-Ph for qemu-devel@nongnu.org; Tue, 01 May 2012 15:29:42 -0400 Received: from /spool/local by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 1 May 2012 20:29:38 +0100 Received: from d06av08.portsmouth.uk.ibm.com (d06av08.portsmouth.uk.ibm.com [9.149.37.249]) by d06nrmr1507.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q41JTZkr929798 for ; Tue, 1 May 2012 20:29:35 +0100 Received: from d06av08.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av08.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q41JTZ0b001466 for ; Tue, 1 May 2012 13:29:35 -0600 From: Stefan Hajnoczi Date: Tue, 1 May 2012 20:28:34 +0100 Message-Id: <1335900518-6730-2-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1335900518-6730-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1335900518-6730-1-git-send-email-stefanha@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH 1/5] tracetool: use Python 2.4-compatible exception handling syntax List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org, Stefan Hajnoczi The newer "except as :" syntax is not supported by Python 2.4, we need to use "except , :". Tested all trace backends with Python 2.4. Reported-by: Andreas Färber Signed-off-by: Stefan Hajnoczi Reviewed-by: Lluís Vilanova --- scripts/tracetool.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/tracetool.py b/scripts/tracetool.py index cacfd99..c003cf6 100755 --- a/scripts/tracetool.py +++ b/scripts/tracetool.py @@ -70,7 +70,7 @@ def main(args): try: opts, args = getopt.getopt(args[1:], "", long_opts) - except getopt.GetoptError as err: + except getopt.GetoptError, err: error_opt(str(err)) check_backend = False @@ -131,7 +131,7 @@ def main(args): try: tracetool.generate(sys.stdin, arg_format, arg_backend, binary = binary, probe_prefix = probe_prefix) - except tracetool.TracetoolError as e: + except tracetool.TracetoolError, e: error_opt(str(e)) if __name__ == "__main__": -- 1.7.10