Skip to content

Commit 5d34060

Browse files
committed
Apply suggestion from @suricactus
1 parent 08317f7 commit 5d34060

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

libqfieldsync/offline_converter.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
***************************************************************************/
2020
"""
2121

22-
import os
2322
import sys
2423
import tempfile
2524
from enum import Enum
@@ -690,9 +689,7 @@ def _export_basemap_as_mbtiles(
690689
try:
691690
# if the basemap file already exists on target destination,
692691
# the `native:tilesxyzmbtiles` alg will throw an error.
693-
if basemap_export_path.exists():
694-
if not basemap_export_path.unlink():
695-
raise Exception("...")
692+
basemap_export_path.unlink(missing_ok=True)
696693

697694
results, ok = alg.run(params, context, self._feedback)
698695

0 commit comments

Comments
 (0)