Fix incorrect import in upgradeability check

pull/418/head
Josselin 5 years ago
parent 0c52bd585f
commit 8ac7039304
  1. 1
      slither/tools/upgradeability/__main__.py
  2. 16
      slither/tools/upgradeability/utils/command_line.py

@ -13,7 +13,6 @@ from slither.utils.output import output_to_json
from .checks import all_checks from .checks import all_checks
from .checks.abstract_checks import AbstractCheck from .checks.abstract_checks import AbstractCheck
from .utils.command_line import output_detectors_json, output_wiki, output_detectors, output_to_markdown from .utils.command_line import output_detectors_json, output_wiki, output_detectors, output_to_markdown
from ...utils.command_line import output_detectors_json
logging.basicConfig() logging.basicConfig()
logger = logging.getLogger("Slither") logger = logging.getLogger("Slither")

@ -81,16 +81,14 @@ def output_to_markdown(detector_classes, filter_wiki):
idx = 1 idx = 1
for (argument, help_info, impact, proxy, v2) in detectors_list: for (argument, help_info, impact, proxy, v2) in detectors_list:
print('{} | `{}` | {} | {} | {} | {}'.format(idx, print('{} | `{}` | {} | {} | {} | {}'.format(idx,
argument, argument,
help_info, help_info,
classification_txt[impact], classification_txt[impact],
'X' if proxy else '', 'X' if proxy else '',
'X' if v2 else '')) 'X' if v2 else ''))
idx = idx + 1 idx = idx + 1
def output_detectors_json(detector_classes): def output_detectors_json(detector_classes):
detectors_list = [] detectors_list = []
for detector in detector_classes: for detector in detector_classes:
@ -120,7 +118,7 @@ def output_detectors_json(detector_classes):
'impact': classification_txt[impact], 'impact': classification_txt[impact],
'wiki_url': wiki_url, 'wiki_url': wiki_url,
'description': description, 'description': description,
'exploit_scenario':exploit, 'exploit_scenario': exploit,
'recommendation':recommendation}) 'recommendation': recommendation})
idx = idx + 1 idx = idx + 1
return table return table

Loading…
Cancel
Save