Skip to content

Commit

Permalink
Merge pull request #484 from pwnage101/insert-cwd
Browse files Browse the repository at this point in the history
make sure the current working dir is in the sys.path
  • Loading branch information
heyman authored Oct 31, 2019
2 parents e17b64c + 4790b5e commit bcaff5c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions locust/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,8 @@ def __import_locustfile__(filename, path):

return imported

# Start with making sure the current working dir is in the sys.path
sys.path.insert(0, os.getcwd())
# Get directory and locustfile name
directory, locustfile = os.path.split(path)
# If the directory isn't in the PYTHONPATH, add it so our import will work
Expand Down

0 comments on commit bcaff5c

Please sign in to comment.