summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configobj.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/configobj.py b/configobj.py
index 74a376b..7377cc9 100644
--- a/configobj.py
+++ b/configobj.py
@@ -2260,6 +2260,10 @@ class ConfigObj(Section):
ret_false = False
#
if ret_false and preserve_errors and out:
+ # If we are preserving errors, but all
+ # the failures are from missing sections / values
+ # then we can return False. Otherwise there is a
+ # real failure that we need to preserve.
ret_false = not any(out.values())
if ret_true:
return True