Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to int comparison for verbosity #99

Merged
merged 1 commit into from
Feb 14, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions watchman/management/commands/watchman.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ def add_arguments(self, parser):
def handle(self, *args, **options):
check_list = None
skip_list = None
verbosity = options['verbosity']
print_all_checks = verbosity in ['2', '3', ]

checks = options['checks']
skips = options['skips']
Expand All @@ -56,5 +54,6 @@ def handle(self, *args, **options):
resp = json.dumps(check())
if '"ok": false' in resp:
raise CommandError(resp)
elif print_all_checks:
# Cast to int for Django < 1.8 (used to be a string value)
elif int(options['verbosity']) >= 2:
self.stdout.write(resp)