X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/c4928c646df3b4ff1409358c2e34b9883d600d39..aaf2b6032eb3297aeb20b5c98223e9da734f56d4:/nominatim/tools/freeze.py?ds=sidebyside diff --git a/nominatim/tools/freeze.py b/nominatim/tools/freeze.py index e502c963..b0ebb2c0 100644 --- a/nominatim/tools/freeze.py +++ b/nominatim/tools/freeze.py @@ -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()