Skip to content

Commit

Permalink
Fail if key is empty.
Browse files Browse the repository at this point in the history
  • Loading branch information
a-feld committed Aug 27, 2019
1 parent 938a0b3 commit 7239e4f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def __new__(cls, value: str) -> "EntryKey":

@staticmethod
def create(value: str) -> "EntryKey":
if len(value) > 255 or any(c not in PRINTABLE for c in value):
if not 0 < len(value) <= 255 or any(c not in PRINTABLE for c in value):
raise ValueError("Invalid EntryKey", value)

return typing.cast(EntryKey, value)
Expand Down

0 comments on commit 7239e4f

Please sign in to comment.