Skip to content

Commit

Permalink
Fixed empty extras field
Browse files Browse the repository at this point in the history
  • Loading branch information
niekrosink committed Jun 27, 2016
1 parent aeff51b commit 020601b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CloudFlare/read_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def read_configs():
email = os.getenv('CF_API_EMAIL')
token = os.getenv('CF_API_KEY')
certtoken = os.getenv('CF_API_CERTKEY')
extras = os.getenv('CF_API_EXTRAS')

# grab values from config files
config = ConfigParser.RawConfigParser()
Expand Down Expand Up @@ -41,7 +42,7 @@ def read_configs():

try:
extras = re.sub(r"\s+", ' ', config.get('CloudFlare', 'extras'))
except ConfigParser.NoOptionError:
except (ConfigParser.NoSectionError, ConfigParser.NoOptionError):
extras = None

if extras:
Expand Down

0 comments on commit 020601b

Please sign in to comment.