summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhjk <hjk@theqtcompany.com>2015-09-17 11:57:30 +0200
committerEike Ziller <eike.ziller@theqtcompany.com>2015-09-24 12:26:43 +0000
commit905aa555436d3121748193964d98e58c7a3aa072 (patch)
tree126dc7d8b6dc2e3096c2c798ae7f903c2f064a45
parent7cd21758d11eabf8acd11be28e4e537616c193ce (diff)
downloadqt-creator-905aa555436d3121748193964d98e58c7a3aa072.tar.gz
Debugger: Reduce scope of usage of Python's importlib module
The module doesn't exist in Python 2.6, so we can't use it unconditionally if 2.6 is to be supported again. Task-number: QTCREATORBUG-15076 Change-Id: Ic91cdf451ce846d892cd914bf850a4fd4b18c488 (cherry picked from commit a7dd2ed4ce0f88eb548dfc1dbb6eb7c5d5c7fd8d) Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
-rw-r--r--share/qtcreator/debugger/dumper.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/share/qtcreator/debugger/dumper.py b/share/qtcreator/debugger/dumper.py
index d81c4d6527..91cb51d554 100644
--- a/share/qtcreator/debugger/dumper.py
+++ b/share/qtcreator/debugger/dumper.py
@@ -34,7 +34,6 @@ import sys
import base64
import re
import time
-import importlib
if sys.version_info[0] >= 3:
xrange = range
@@ -1690,7 +1689,7 @@ class DumperBase:
self.resetCaches()
for mod in self.dumpermodules:
- m = importlib.import_module(mod)
+ m = __import__(mod)
dic = m.__dict__
for name in dic.keys():
item = dic[name]
@@ -1711,6 +1710,7 @@ class DumperBase:
for mod in self.dumpermodules:
m = sys.modules[mod]
if sys.version_info[0] >= 3:
+ import importlib
importlib.reload(m)
else:
reload(m)