Skip to content

Commit

Permalink
Move sys.path insert earlier in s3op.py (#1098)
Browse files Browse the repository at this point in the history
  • Loading branch information
romain-intel authored Aug 3, 2022
1 parent 925530b commit f11a372
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions metaflow/datatools/s3op.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
from urllib.parse import urlparse
from queue import Full as QueueFull

if __name__ == "__main__":
# When launched standalone, point to our parent metaflow
sys.path.insert(
0, os.path.abspath(os.path.join(os.path.dirname(__file__), "../../"))
)

from metaflow._vendor import click

# we use Metaflow's parallel_imap_unordered instead of
Expand Down Expand Up @@ -1052,9 +1058,4 @@ def info(


if __name__ == "__main__":
# When launched standalone, point to our parent metaflow
sys.path.insert(
0, os.path.abspath(os.path.join(os.path.dirname(__file__), "../../"))
)

cli(auto_envvar_prefix="S3OP")

0 comments on commit f11a372

Please sign in to comment.