From 51845c10363f5ef64307552e73c8b4641536bd30 Mon Sep 17 00:00:00 2001 From: Andre Perunicic Date: Sun, 16 Apr 2017 22:58:14 -0400 Subject: [PATCH] Update settings to read AWS keys from environment --- steam/steam/settings.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/steam/steam/settings.py b/steam/steam/settings.py index e2e0ae5..3f76dfb 100644 --- a/steam/steam/settings.py +++ b/steam/steam/settings.py @@ -1,13 +1,4 @@ -# -*- coding: utf-8 -*- - -# Scrapy settings for steam project -# -# For simplicity, this file contains only settings considered important or -# commonly used. You can find more settings consulting the documentation: -# -# http://doc.scrapy.org/en/latest/topics/settings.html -# http://scrapy.readthedocs.org/en/latest/topics/downloader-middleware.html -# http://scrapy.readthedocs.org/en/latest/topics/spider-middleware.html +from smart_getenv import getenv BOT_NAME = 'steam' @@ -89,4 +80,7 @@ HTTPCACHE_EXPIRATION_SECS = 0 # Never expire. HTTPCACHE_DIR = 'httpcache' HTTPCACHE_IGNORE_HTTP_CODES = [301, 302, 303, 306, 307, 308] -HTTPCACHE_STORAGE = 'steam.middlewares.SteamCacheStorage' \ No newline at end of file +HTTPCACHE_STORAGE = 'steam.middlewares.SteamCacheStorage' + +AWS_ACCESS_KEY_ID = getenv('AWS_ACCESS_KEY_ID', type=str, default=None) +AWS_SECRET_ACCESS_KEY = getenv('AWS_SECRET_ACCESS_KEY', type=str, default=None)