Skip to content

Commit

Permalink
fix encounter NoneType in Input valid()
Browse files Browse the repository at this point in the history
  • Loading branch information
bchao1 committed Sep 13, 2020
1 parent 30cf0e3 commit 75f620d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bullet/client.py
Expand Up @@ -426,6 +426,8 @@ def __init__(
self.pattern = pattern

def valid(self, ans):
if ans is None:
return False
if not bool(re.match(self.pattern, ans)):
utils.moveCursorUp(1)
utils.forceWrite(' ' * self.indent + self.prompt + self.default)
Expand Down

0 comments on commit 75f620d

Please sign in to comment.