Skip to content

Commit

Permalink
Merge pull request #4 from goodve/main
Browse files Browse the repository at this point in the history
fix " No module named 'har2locust\\default" in  windows OS
  • Loading branch information
cyberw authored Mar 4, 2023
2 parents 469fd14 + d1ec467 commit 7ed3c98
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion har2locust/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ def load_plugins(plugins: list[str] = [], disable_plugins: list[str] = []):

sys.path.append(os.path.curdir) # accept plugins by relative path
for plugin in default_and_extra_plugins:
import_path = plugin.replace("/", ".").rstrip(".py")
# in windows OS print(plugin) echo har2locust\default_plugins\1_resourcefilter.py
import_path = plugin.replace("/", ".").replace("\\", ".").rstrip(".py")
importlib.import_module(import_path)
logging.debug("imported " + import_path)
logging.debug(f"loaded plugins {default_and_extra_plugins}")
Expand Down

0 comments on commit 7ed3c98

Please sign in to comment.