-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
would crash if get_home() returns None #2300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I just had a look at the sources ; in lib/matplotlib/init.py:
so it is looking into environment variables... |
I agree that crashing strangely in |
Ooohh... I had misread the original bug report... I had understood the code wasn't finding the home even though it was explicit... and now I see that $HOME points to something invalid! |
Well I have filed a report instead of a PR because for me all the ambiguity where TMP could be the "home" is not clear. Imho |
One very pertinent PR relating to this: #1824 |
Yeah, I think your suggestion to return |
I have a very vague recollection of an issue reported once by a user that |
@WeatherGod: #1824 is one such issue. I think what's happened here is I broke support for that when I moved to using XDG directories on Linux. It looks, on further reflection, like we need to go the longer route and handle the case where |
would crash if get_home() returns None
See http://bugs.debian.org/719384 for original reports.
ATM
get_home()
would return None if none of the home directories current exists, even though e.g. HOME environment variable is set.As a result os.path.join would spit out exception since it was not devised to have any opinion about None.
IMHO the logic here should be fixed and get_home should not return None even if a directory pointed to by HOME environment variable on a POSIX platform is defined