Skip to content

Commit

Permalink
Change validation method from Some/None to True/False
Browse files Browse the repository at this point in the history
  • Loading branch information
LegenJCdary committed Apr 21, 2022
1 parent 87267e2 commit b9c2cc2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/modules/validators/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ def validate_options(self, options: dict):

failed = False
for req in required:
if options[req] is None:
if not options[req]:
self.logger.error("%s is required for %s", req, options["subcommand"])
failed = True

for notsup in notsupported:
if options[notsup] is not None:
if options[notsup]:
self.logger.error("%s is not supported by %s", notsup, options["subcommand"])
failed = True

Expand Down

0 comments on commit b9c2cc2

Please # to comment.