Skip to content

Commit

Permalink
Fix bug in API and context menu 'Process in Turbo Data Miner'
Browse files Browse the repository at this point in the history
  • Loading branch information
chopicalqui committed Jun 13, 2020
1 parent b623f9f commit 6936ab3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion turbodataminer/turbodataminer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1457,6 +1457,7 @@ def get_header(self, headers, header_name):
(None, None) is returned.
"""
lower_header_name = header_name.lower()
result = (None, None)
for header in headers:
if not self._ide_pane.activated:
return result
Expand All @@ -1465,7 +1466,7 @@ def get_header(self, headers, header_name):
value = ":".join(tmp[1:]).strip()
if lower_header_name == name:
return (name, value)
return (None, None)
return result

def get_headers(self, headers, re_headers):
"""
Expand Down Expand Up @@ -1630,6 +1631,8 @@ def get_extension_info(self, content):
was identified. The dictionary contains the following keys: extension (str), category (str), description (str)
"""
for extension in self._extensions["extensions"]:
if not self._ide_pane.activated:
break
if content.endswith(".{}".format(extension["extension"])):
return extension
return None
Expand Down Expand Up @@ -2448,11 +2451,14 @@ def menu_invocation_pressed(self, invocation):
try:
self._ref = 1
self._ide_pane.compile()
self._ide_pane.activated = True
for message_info in invocation.getSelectedMessages():
self.process_proxy_history_entry(message_info, invocation.getToolFlag(), in_scope=True)
self._ide_pane.activated = False
except:
traceback.print_exc(file=self._callbacks.getStderr())
ErrorDialog.Show(self._extender.parent, traceback.format_exc())
self._ide_pane.activated = False


class ProxyHistoryAnalyzerBase(AnalyzerBase):
Expand Down

0 comments on commit 6936ab3

Please sign in to comment.