File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -450,13 +450,11 @@ def path_inject(own_location: str = "") -> None:
450450 inject_paths .append (str (py_path ))
451451
452452 # last option, if nothing else is found, just look next to ourselves...
453- own_location = os .path .realpath (own_location )
454- if (
455- own_location
456- and (Path (own_location ).parent / "ansible" ).exists ()
457- and str (Path (own_location ).parent ) not in paths
458- ):
459- inject_paths .append (str (Path (own_location ).parent ))
453+ if own_location :
454+ own_location = os .path .realpath (own_location )
455+ parent = Path (own_location ).parent
456+ if (parent / "ansible" ).exists () and str (parent ) not in paths :
457+ inject_paths .append (str (parent ))
460458
461459 if not os .environ .get ("PYENV_VIRTUAL_ENV" , None ):
462460 if inject_paths and not all ("pipx" in p for p in inject_paths ):
You can’t perform that action at this time.
0 commit comments