Skip to content

Commit a8a5494

Browse files
authored
Merge pull request #313 from MerginMaps/fix_trustore_importerror
Fix trustore import error
2 parents 6f4b26f + dc6b7aa commit a8a5494

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

mergin/client.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import platform
1212
from datetime import datetime, timezone
1313
import dateutil.parser
14-
import truststore
1514
from enum import Enum, auto
1615
import re
1716
import typing
@@ -71,7 +70,12 @@
7170
)
7271
from .version import __version__
7372

74-
truststore.inject_into_ssl()
73+
try:
74+
import truststore
75+
76+
truststore.inject_into_ssl()
77+
except ImportError:
78+
logging.getLogger("mergin.client").warning("truststore could not be imported, continuing without it")
7579

7680
json_headers = {"Content-Type": "application/json"}
7781

mergin/client_pull.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ def pull_project_finalize(job: PullJob):
701701
except NotImplementedError as e:
702702
job.mp.log.error("Failed to get project info v2 in this server version: " + str(e))
703703
job.mp.log.info("--- pull aborted")
704-
raise ClientError("Failed to get project info v2 as server not support it: " + str(e))
704+
raise ClientError("Failed to get project info v2 as server does not support it: " + str(e))
705705
except ClientError as e:
706706
job.mp.log.error("Failed to get project info v2: " + str(e))
707707
job.mp.log.info("--- pull aborted")

0 commit comments

Comments
 (0)