Skip to content

Commit 6aed5ba

Browse files
committed
Fix: Load driver configuration only when it's successfully read from file(s)
1 parent f0bcad8 commit 6aed5ba

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

firebird/driver/config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,8 @@ def read(self, filenames: Union[str, Iterable], encoding: str=None):
215215
"""
216216
parser = ConfigParser(interpolation=ExtendedInterpolation())
217217
read_ok = parser.read(filenames, encoding)
218-
self.load_config(parser)
218+
if read_ok:
219+
self.load_config(parser)
219220
return read_ok
220221
def read_file(self, f):
221222
"""Read configuration from a file-like object.

0 commit comments

Comments
 (0)