Skip to content

Commit

Permalink
fixup! REDSHIFT: standardize credential usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Zachary Salzbank committed Mar 22, 2017
1 parent d8e406d commit 615d8ff
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions luigi/contrib/redshift.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@
import time
import os

try:
from ConfigParser import NoSectionError
except:
from configparser import NoSectionError

import luigi
from luigi import postgres
from luigi.contrib import rdbms
Expand Down Expand Up @@ -95,10 +90,7 @@ def aws_session_token(self):
def _get_configuration_attribute(self, attribute):
config = luigi.configuration.get_config()

try:
value = config.get(self.configuration_section, attribute)
except NoSectionError:
value = None
value = config.get(self.configuration_section, attribute, default=None)

if not value:
value = os.environ.get(attribute.upper(), None)
Expand Down

0 comments on commit 615d8ff

Please sign in to comment.