Skip to content

Commit

Permalink
Added null check on registry in base encoder
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanmendoza committed Nov 24, 2018
1 parent abceb18 commit f939865
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions eth_abi/codec.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@

class BaseABICodecEncoder():
def __init__(self, registry):
if registry is None:
raise ValueError("`registry` may not be None")

self._registry = registry

def encode_single(self, typ: TypeStr, arg: Any) -> bytes:
Expand Down
4 changes: 4 additions & 0 deletions tests/test_codec/test_base_abi_codec_encoder.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from eth_abi.codec import (
BaseABICodecEncoder,
)

0 comments on commit f939865

Please sign in to comment.