Pathlib Python 3.7 Compatibility Fix (#831)

small fix.
This commit is contained in:
Alexander Kristoffersen authored and GitHub committed 2022-10-25 10:01:39 -07:00
1 parent ae55559c32
commit 18a6a71a1a
2 files changed
+8 -3

No files matched your search

+4 -2
View File
@@ -32,7 +32,8 @@ def download_blender(save_dir: Path):
unzip_path = save_dir / Path("nerf_synthetic")
final_path = save_dir / Path("blender")
unzip_path.rename(final_path)
download_path.unlink(missing_ok=True)
if download_path.exists():
download_path.unlink()
def download_friends(save_dir: Path):
@@ -123,7 +124,8 @@ def download_dnerf(save_dir: Path):
unzip_path = save_dir / Path("data")
final_path = save_dir / Path("dnerf")
unzip_path.rename(final_path)
download_path.unlink(missing_ok=True)
if download_path.exists():
download_path.unlink()
def main(
+4 -1
View File
@@ -345,7 +345,10 @@ def run_colmap(
colmap_version = get_colmap_version()
(colmap_dir / "database.db").unlink(missing_ok=True)
colmap_database_path = colmap_dir / "database.db"
if colmap_database_path.exists():
# Can't use missing_ok argument because of Python 3.7 compatibility.
colmap_database_path.unlink()
# Feature extraction
feature_extractor_cmd = [