Init config dir (#1595)

pull/1608/head
Nikhil Parasaram 3 years ago committed by GitHub
parent ed90d243b7
commit f380bbf689
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      mythril/interfaces/cli.py
  2. 4
      mythril/mythril/mythril_config.py

@ -977,6 +977,7 @@ def parse_args_and_execute(parser: ArgumentParser, args: Namespace) -> None:
sys.exit() sys.exit()
if args.command in CONCOLIC_LIST: if args.command in CONCOLIC_LIST:
_ = MythrilConfig.init_mythril_dir()
with open(args.input) as f: with open(args.input) as f:
concrete_data = json.load(f) concrete_data = json.load(f)
output_list = concolic_execution( output_list = concolic_execution(

@ -22,7 +22,7 @@ class MythrilConfig:
def __init__(self): def __init__(self):
self.infura_id = os.getenv("INFURA_ID") # type: str self.infura_id = os.getenv("INFURA_ID") # type: str
self.mythril_dir = self._init_mythril_dir() self.mythril_dir = self.init_mythril_dir()
self.config_path = os.path.join(self.mythril_dir, "config.ini") self.config_path = os.path.join(self.mythril_dir, "config.ini")
self._init_config() self._init_config()
self.eth = None # type: Optional[EthJsonRpc] self.eth = None # type: Optional[EthJsonRpc]
@ -31,7 +31,7 @@ class MythrilConfig:
self.infura_id = id self.infura_id = id
@staticmethod @staticmethod
def _init_mythril_dir() -> str: def init_mythril_dir() -> str:
""" """
Initializes the mythril dir and config.ini file Initializes the mythril dir and config.ini file
:return: The mythril dir's path :return: The mythril dir's path

Loading…
Cancel
Save