aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2012-04-27 14:24:41 +0100
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2012-05-01 20:15:28 +0100
commit45d6c787751650ac332447444c192201dfc526af (patch)
treec9dbcaebb8ed25d1e0ff9cc18a3dc84068d0cb16 /scripts
parent662da3854e3f490223373b40afdcfcc339d14aa5 (diff)
tracetool: use Python 2.4-compatible __import__() arguments
In Python 2.5 keyword arguments were added to __import__(). Avoid using them to achieve Python 2.4 compatibility. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Reviewed-by: LluĂ­s Vilanova <vilanova@ac.upc.edu>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/tracetool/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/tracetool/__init__.py b/scripts/tracetool/__init__.py
index 74fe21b226..49858c9e33 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)