mirror of https://github.com/zulip/zulip.git
Remove duplicate validation in email_mirror
We already have a try-except earlier in the file about email_gateway_user, so we don't need to check for it again. (imported from commit 2d9fa357fab2605916c5c5cb61961c0a121b1211)
This commit is contained in:
parent
ff44d4acde
commit
266c0f4886
|
@ -57,6 +57,7 @@ try:
|
||||||
api_key = email_gateway_user.api_key
|
api_key = email_gateway_user.api_key
|
||||||
except UserProfile.DoesNotExist:
|
except UserProfile.DoesNotExist:
|
||||||
print "No configured %s user" % (settings.EMAIL_GATEWAY_BOT,)
|
print "No configured %s user" % (settings.EMAIL_GATEWAY_BOT,)
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
if settings.DEPLOYED:
|
if settings.DEPLOYED:
|
||||||
|
@ -310,8 +311,7 @@ Run this command out of a cron job.
|
||||||
def handle(self, **options):
|
def handle(self, **options):
|
||||||
if (not settings.EMAIL_GATEWAY_BOT or not settings.EMAIL_GATEWAY_LOGIN or
|
if (not settings.EMAIL_GATEWAY_BOT or not settings.EMAIL_GATEWAY_LOGIN or
|
||||||
not settings.EMAIL_GATEWAY_PASSWORD or not settings.EMAIL_GATEWAY_IMAP_SERVER or
|
not settings.EMAIL_GATEWAY_PASSWORD or not settings.EMAIL_GATEWAY_IMAP_SERVER or
|
||||||
not settings.EMAIL_GATEWAY_IMAP_PORT or not settings.EMAIL_GATEWAY_IMAP_FOLDER or
|
not settings.EMAIL_GATEWAY_IMAP_PORT or not settings.EMAIL_GATEWAY_IMAP_FOLDER):
|
||||||
not email_gateway_user):
|
|
||||||
print "Please configure the Email Mirror Gateway in your local_settings.py"
|
print "Please configure the Email Mirror Gateway in your local_settings.py"
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue