diff options
author | ankitjavalkar | 2018-03-05 19:24:49 +0530 |
---|---|---|
committer | ankitjavalkar | 2018-03-05 19:24:49 +0530 |
commit | db267f32c158f4311c017ad3febe049a680ed5c0 (patch) | |
tree | 8f6c6d677c5054a4318d78632c22f4153b4e1f45 /yaksh | |
parent | 3d0ea52eaf04c234bc1f562fa695743e3752462f (diff) | |
download | online_test-db267f32c158f4311c017ad3febe049a680ed5c0.tar.gz online_test-db267f32c158f4311c017ad3febe049a680ed5c0.tar.bz2 online_test-db267f32c158f4311c017ad3febe049a680ed5c0.zip |
Add an else statement instead of continue keyword
Diffstat (limited to 'yaksh')
-rw-r--r-- | yaksh/management/commands/add_moderator.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/yaksh/management/commands/add_moderator.py b/yaksh/management/commands/add_moderator.py index 461c03f..5e63285 100644 --- a/yaksh/management/commands/add_moderator.py +++ b/yaksh/management/commands/add_moderator.py @@ -32,6 +32,6 @@ class Command(BaseCommand): raise CommandError('User "{0}" does not exist'.format(uname)) if user in group.user_set.all(): self.stdout.write('User "{0}" is already a Moderator'.format(uname)) - continue - group.user_set.add(user) - self.stdout.write('Successfully added User "{0}" to Moderator group'.format(uname)) + else: + group.user_set.add(user) + self.stdout.write('Successfully added User "{0}" to Moderator group'.format(uname)) |