Ignore plyvel (#1543)

pull/1544/head
Nikhil Parasaram 3 years ago committed by GitHub
parent 8bde93f621
commit 651e0ac827
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      mythril/ethereum/interface/leveldb/eth_db.py

@ -1,13 +1,23 @@
"""This module contains the ETH_DB class, which the base database used by
pyethereum."""
import plyvel
from ethereum.db import BaseDB
has_plyvel = True
try:
import plyvel
except ImportError:
has_plyvel = False
class ETH_DB(BaseDB):
"""Adopts pythereum BaseDB using plyvel."""
def __init__(self, path):
if has_plyvel is False:
raise ImportError(
"Plyvel is not installed, please install plyvel and leveldb"
)
self.db = plyvel.DB(path)
def get(self, key):

Loading…
Cancel
Save