Skip to content

Commit

Permalink
Fix error when no gef.virtualenv_path is provided
Browse files Browse the repository at this point in the history
  • Loading branch information
ValekoZ committed Jun 5, 2024
1 parent 65330a7 commit f5f1bc5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gef.py
Original file line number Diff line number Diff line change
Expand Up @@ -9948,8 +9948,8 @@ def load_plugins_from_directory(plugin_directory: pathlib.Path):


def load_virtualenv(self, new_path: Optional[pathlib.Path] = None):
path = new_path or pathlib.Path(gef.config["gef.virtualenv_path"])
activate_script_path = path / "bin" / "activate_this.py"
path = new_path or gef.config["gef.virtualenv_path"]
activate_script_path = pathlib.Path(path) / "bin" / "activate_this.py"
if path:
exec(open(activate_script_path).read(), {'__file__': activate_script_path})

Expand Down

0 comments on commit f5f1bc5

Please sign in to comment.