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:
Luke Faraone 2013-12-16 17:27:56 -05:00
parent ff44d4acde
commit 266c0f4886
1 changed files with 2 additions and 2 deletions

View File

@ -57,6 +57,7 @@ try:
api_key = email_gateway_user.api_key
except UserProfile.DoesNotExist:
print "No configured %s user" % (settings.EMAIL_GATEWAY_BOT,)
sys.exit(1)
if settings.DEPLOYED:
@ -310,8 +311,7 @@ Run this command out of a cron job.
def handle(self, **options):
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_IMAP_PORT or not settings.EMAIL_GATEWAY_IMAP_FOLDER or
not email_gateway_user):
not settings.EMAIL_GATEWAY_IMAP_PORT or not settings.EMAIL_GATEWAY_IMAP_FOLDER):
print "Please configure the Email Mirror Gateway in your local_settings.py"
exit(1)