From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35927) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPFCW-0003QU-L2 for qemu-devel@nongnu.org; Tue, 01 May 2012 11:41:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SPFCV-00048D-0R for qemu-devel@nongnu.org; Tue, 01 May 2012 11:41:16 -0400 Received: from e06smtp11.uk.ibm.com ([195.75.94.107]:53357) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPFCU-00047B-OP for qemu-devel@nongnu.org; Tue, 01 May 2012 11:41:14 -0400 Received: from /spool/local by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 1 May 2012 16:41:10 +0100 Received: from d06av08.portsmouth.uk.ibm.com (d06av08.portsmouth.uk.ibm.com [9.149.37.249]) by d06nrmr1407.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q41Ff8na2609364 for ; Tue, 1 May 2012 16:41:08 +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 q41Ff7UL028748 for ; Tue, 1 May 2012 09:41:08 -0600 From: Stefan Hajnoczi Date: Tue, 1 May 2012 16:40:56 +0100 Message-Id: <1335886859-1028-3-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1335886859-1028-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1335886859-1028-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 v3 2/5] tracetool: use Python 2.4-compatible __import__() arguments List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Anthony Liguori , Stefan Hajnoczi , Erik Rull , Andreas Faerber , =?UTF-8?q?Llu=C3=ADs=20Vilanova?= In Python 2.5 keyword arguments were added to __import__(). Avoid using them to achieve Python 2.4 compatibility. Signed-off-by: Stefan Hajnoczi Reviewed-by: LluĂ­s Vilanova --- scripts/tracetool/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/tracetool/__init__.py b/scripts/tracetool/__init__.py index 74fe21b..49858c9 100644 --- a/scripts/tracetool/__init__.py +++ b/scripts/tracetool/__init__.py @@ -204,7 +204,7 @@ def try_import(mod_name, attr_name = None, attr_default = None): object or attribute value. """ try: - module = __import__(mod_name, fromlist=["__package__"]) + module = __import__(mod_name, globals(), locals(), ["__package__"]) if attr_name is None: return True, module return True, getattr(module, str(attr_name), attr_default) -- 1.7.10