diff --git a/sendgrid/helpers/inbound/config.py b/sendgrid/helpers/inbound/config.py index db5ba7b96..a72a10ab1 100644 --- a/sendgrid/helpers/inbound/config.py +++ b/sendgrid/helpers/inbound/config.py @@ -5,14 +5,14 @@ class Config(object): """All configuration for this app is loaded here""" - def __init__(self): + def __init__(self, **opts): if (os.environ.get('ENV') != 'prod'): # We are not in Heroku self.init_environment() """Allow variables assigned in config.yml available the following variables via properties""" - self.base_path = os.path.abspath(os.path.dirname(__file__)) - with open(self.base_path + '/config.yml') as stream: + self.path = opts.get('path', os.path.abspath(os.path.dirname(__file__))) + with open(self.path + '/config.yml') as stream: config = yaml.load(stream) self._debug_mode = config['debug_mode'] self._endpoint = config['endpoint']