Skip to content

Commit d6e8a16

Browse files
authored
Merge pull request #277 from MerginMaps/fix_pygeodiff_import
import geodiff from deps in client_push
2 parents 4ad9bbf + 4013d69 commit d6e8a16

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

mergin/client_push.py

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,9 @@
1515
import tempfile
1616
import concurrent.futures
1717
import os
18-
from pygeodiff import (
19-
GeoDiff,
20-
GeoDiffLibError,
21-
GeoDiffLibConflictError,
22-
GeoDiffLibUnsupportedChangeError,
23-
GeoDiffLibVersionError,
24-
)
2518

2619
from .common import UPLOAD_CHUNK_SIZE, ClientError
27-
from .merginproject import MerginProject
20+
from .merginproject import MerginProject, pygeodiff
2821
from .editor import filter_changes
2922
from .utils import cleanup_tmp_dir
3023

@@ -338,12 +331,12 @@ def _geodiff_changes_count(mp: MerginProject, diff_rel_path: str):
338331

339332
diff_abs = mp.fpath_meta(diff_rel_path)
340333
try:
341-
return GeoDiff().changes_count(diff_abs)
334+
return pygeodiff.GeoDiff().changes_count(diff_abs)
342335
except (
343-
GeoDiffLibError,
344-
GeoDiffLibConflictError,
345-
GeoDiffLibUnsupportedChangeError,
346-
GeoDiffLibVersionError,
336+
pygeodiff.GeoDiffLibError,
337+
pygeodiff.GeoDiffLibConflictError,
338+
pygeodiff.GeoDiffLibUnsupportedChangeError,
339+
pygeodiff.GeoDiffLibVersionError,
347340
FileNotFoundError,
348341
):
349342
return None

0 commit comments

Comments
 (0)