localserver: Add support for not having an APNS_CERT_FILE.

(imported from commit 42d8caebb3035bd9e6e19db6359cc33e8ab4f317)
This commit is contained in:
Tim Abbott 2013-11-10 11:36:33 -05:00
parent 3963eef723
commit b0dc882f7e
2 changed files with 2 additions and 1 deletions

View File

@ -14,7 +14,7 @@ import base64, binascii, logging, os
# for each request # for each request
session = Session() session = Session()
connection = None connection = None
if os.path.exists(settings.APNS_CERT_FILE): if settings.APNS_CERT_FILE is not None and os.path.exists(settings.APNS_CERT_FILE):
connection = session.get_connection(settings.APNS_SANDBOX, cert_file=settings.APNS_CERT_FILE) connection = session.get_connection(settings.APNS_SANDBOX, cert_file=settings.APNS_CERT_FILE)
def num_push_devices_for_user(user_profile): def num_push_devices_for_user(user_profile):

View File

@ -245,6 +245,7 @@ DEFAULT_SETTINGS = {'TWITTER_CONSUMER_KEY': '',
'NEW_USER_BOT': None, 'NEW_USER_BOT': None,
'NAGIOS_STAGING_SEND_BOT': None, 'NAGIOS_STAGING_SEND_BOT': None,
'NAGIOS_STAGING_RECEIVE_BOT': None, 'NAGIOS_STAGING_RECEIVE_BOT': None,
'APNS_CERT_FILE': None,
'ZULIP_ADMINISTRATOR': '' 'ZULIP_ADMINISTRATOR': ''
} }