mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
fix uses of config.get_path() to expect None
This commit is contained in:
@@ -42,10 +42,8 @@ def drop_update_tables(conn):
|
||||
conn.commit()
|
||||
|
||||
|
||||
def drop_flatnode_file(fname):
|
||||
def drop_flatnode_file(fpath):
|
||||
""" Remove the flatnode file if it exists.
|
||||
"""
|
||||
if fname:
|
||||
fpath = Path(fname)
|
||||
if fpath.exists():
|
||||
fpath.unlink()
|
||||
if fpath and fpath.exists():
|
||||
fpath.unlink()
|
||||
|
||||
@@ -174,7 +174,7 @@ def _quote_php_variable(var_type, config, conf_name):
|
||||
return 'false'
|
||||
|
||||
if var_type == Path:
|
||||
value = str(config.get_path(conf_name))
|
||||
value = str(config.get_path(conf_name) or '')
|
||||
else:
|
||||
value = getattr(config, conf_name)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user