Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 12 additions & 14 deletions mergin/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,20 +114,18 @@ class InvalidProject(Exception):
pass


try:
import dateutil.parser
from dateutil.tz import tzlocal

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not eough to add here also trustore?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

truststore is not used here..
we don't need it to import it e.g. for CLI

except ImportError:
# this is to import all dependencies shipped with package (e.g. to use in qgis-plugin)
deps_dir = os.path.join(this_dir, "deps")
if os.path.exists(deps_dir):
import sys

for f in os.listdir(os.path.join(deps_dir)):
sys.path.append(os.path.join(deps_dir, f))

import dateutil.parser
from dateutil.tz import tzlocal
# add dependencies shipped in deps/ on sys.path
deps_dir = os.path.join(this_dir, "deps")
if os.path.exists(deps_dir):
import sys

for f in os.listdir(deps_dir):
dep_path = os.path.join(deps_dir, f)
if dep_path not in sys.path:
sys.path.append(dep_path)

import dateutil.parser
from dateutil.tz import tzlocal


class WorkspaceRole(Enum):
Expand Down
Loading