diff --git a/slate/slate.py b/slate/slate.py index be07908..04ce67d 100644 --- a/slate/slate.py +++ b/slate/slate.py @@ -118,7 +118,12 @@ class Slate(): if len(keys_arr) == 1: k = keys_arr[0] if default != None: - val = conf.get(k, default) + if isinstance(conf, collections.abc.Mapping): + val = conf.get(k, default) + else: + if default: + return default + raise Exception('') else: val = conf[k] if k in conf: