There was an error while loading. Please reload this page.
1 parent 60cf1da commit a334bdbCopy full SHA for a334bdb
1 file changed
postgresql/installation.py
@@ -186,11 +186,16 @@ def default_pg_config():
186
if os.path.exists(os.path.join(x, 'pg_config'))
187
] + [None])[0]
188
)
189
- return pg_config_path if os.path.exists(pg_config_path) else None
+ return pg_config_path if (
190
+ pg_config_path and os.path.exists(pg_config_path)
191
+ ) else None
192
193
@classmethod
194
def default(typ):
- return typ(typ.default_pg_config())
195
+ path = typ.default_pg_config()
196
+ if path is None:
197
+ return None
198
+ return typ(path)
199
200
def __new__(typ, pg_config_path):
201
# One instance for each installation.
0 commit comments