Skip to content

Commit

Permalink
Fix Object Inspector in Python console editor
Browse files Browse the repository at this point in the history
  • Loading branch information
g-sherman committed Sep 27, 2017
1 parent 43a9bc1 commit 036646f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions python/console/console_editor.py
Expand Up @@ -34,6 +34,7 @@
import traceback
import codecs
import re
import importlib


class KeyFilter(QObject):
Expand Down Expand Up @@ -520,7 +521,7 @@ def _runSubProcess(self, filename, tmp=False):
if dir not in sys.path:
sys.path.append(dir)
if name in sys.modules:
reload(sys.modules[name]) # NOQA
importlib.reload(sys.modules[name]) # NOQA
try:
# set creationflags for running command without shell window
if sys.platform.startswith('win'):
Expand Down Expand Up @@ -1174,7 +1175,7 @@ def listObject(self, tab):
sys.path.append(pathFile)
found = True
try:
reload(pyclbr) # NOQA
importlib.reload(pyclbr) # NOQA
dictObject = {}
readModule = pyclbr.readmodule(module)
readModuleFunction = pyclbr.readmodule_ex(module)
Expand Down Expand Up @@ -1236,10 +1237,10 @@ def listObject(self, tab):
iconWarning = QgsApplication.getThemeIcon("console/iconSyntaxErrorConsole.png")
msgItem.setIcon(0, iconWarning)
self.parent.listClassMethod.addTopLevelItem(msgItem)
# s = traceback.format_exc()
# print '## Error: '
# sys.stderr.write(s)
# pass
# s = traceback.format_exc()
# print('## Error: ')
# sys.stderr.write(s)
# pass

def refreshSettingsEditor(self):
countTab = self.count()
Expand Down

0 comments on commit 036646f

Please sign in to comment.