diff --git a/scripts/setup/generate_enterprise_secrets.py b/scripts/setup/generate_enterprise_secrets.py index 33a6001d46..8e2d3e31ae 100755 --- a/scripts/setup/generate_enterprise_secrets.py +++ b/scripts/setup/generate_enterprise_secrets.py @@ -16,9 +16,6 @@ CAMO_CONFIG_FILENAME = '/etc/default/camo' AUTOGENERATED_SETTINGS = ['shared_secret', 'avatar_salt', 'rabbitmq_password', 'local_database_password', 'initial_password_salt'] -EMPTY_SETTINGS = ['deployment_role_key', 'mandrill_api_key', 'mailchimp_api_key', 'email_password', 's3_key', 's3_secret_key', - 'google_oauth2_client_secret', 'dev_google_oauth2_client_secret'] - def generate_camo_config_file(camo_key): camo_config = """ENABLED=yes PORT=9292 @@ -54,9 +51,6 @@ def generate_secrets(development=False): # Write the Camo config file directly generate_camo_config_file(camo_key) - for name in EMPTY_SETTINGS: - lines.append(config_line(name, '')) - out = open(OUTPUT_SETTINGS_FILENAME, 'w') out.write("".join(lines)) out.close() diff --git a/zproject/local_settings.py b/zproject/local_settings.py index b15c34cac7..4df75ad062 100644 --- a/zproject/local_settings.py +++ b/zproject/local_settings.py @@ -21,7 +21,10 @@ if DEPLOYED: else: secrets_file.read("zproject/dev-secrets.conf") -get_secret = lambda x: secrets_file.get('secrets', x) +def get_secret(key): + if secrets_file.has_option('secrets', key): + return secrets_file.get('secrets', key) + return None MAILCHIMP_API_KEY = get_secret("mailchimp_api_key") ZULIP_FRIENDS_LIST_ID = '84b2f3da6b'