From 5c8afef70593d464faa6ce6b275e2af7b30b7e12 Mon Sep 17 00:00:00 2001 From: Carl Kibler Date: Mon, 16 May 2016 15:34:35 -0600 Subject: [PATCH] Process 'extras' only if they are set --- CloudFlare/__init__.py | 3 ++- CloudFlare/read_configs.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CloudFlare/__init__.py b/CloudFlare/__init__.py index 43519b5..86be80e 100644 --- a/CloudFlare/__init__.py +++ b/CloudFlare/__init__.py @@ -195,5 +195,6 @@ def __init__(self, email=None, token=None, certtoken=None, debug=False): # add the API calls api_v4(self) - api_extras(self, extras) + if extras: + api_extras(self, extras) diff --git a/CloudFlare/read_configs.py b/CloudFlare/read_configs.py index 9fde05b..28e8299 100644 --- a/CloudFlare/read_configs.py +++ b/CloudFlare/read_configs.py @@ -37,7 +37,8 @@ def read_configs(): except: extras = None - extras = extras.split(' ') + if extras: + extras = extras.split(' ') return [ email, token, certtoken, extras ]