Commit a7dd2ed4 authored by hjk's avatar hjk

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
Reviewed-by: default avatarChristian Stenger <>
parent 6b89f80e
......@@ -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:
for mod in self.dumpermodules:
m = importlib.import_module(mod)
m = __import__(mod)
dic = m.__dict__
for name in dic.keys():
item = dic[name]
......@@ -1708,6 +1707,7 @@ class DumperBase:
for mod in self.dumpermodules:
m = sys.modules[mod]
if sys.version_info[0] >= 3:
import importlib
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment