Message7365
In message <c093fec4-798d-57b4-a6c6-df7ce48ad111@priesch.co.at>,
Marcus Priesch writes:
>you are definitely right, we should solve the infinite loop ;)
>
>its happening here:
>
> > while tail != 'lib' and head != '':
> > head, tail = os.path.split(head)
>
> >>> get_path("platlib")
>'/home/pr/work/projects/5t-roundup/ve2/lib64/python2.7/site-packages'
>
>it consumes everything (as no "lib" anywhere) and stays at head == "/"
Ah I have the wrong stop condition. Ok that's a good catch.
I wonder if we can do better on the lib check. Would:
if tail not in [ 'lib', 'lib64' ] and head != '/':
work? I am thinking of a user libby who creates a virtual env under
/home/libby/roundup. Matching ^lib would make a mess of her home
directory. (Yes, a libby born in 1964 could have username lib64
but....)
Thoughts? |
|
Date |
User |
Action |
Args |
2021-11-09 22:51:58 | rouilj | set | recipients:
+ rouilj, marcus.priesch |
2021-11-09 22:51:58 | rouilj | link | issue2551169 messages |
2021-11-09 22:51:58 | rouilj | create | |
|