Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Put user's name in the temp directory that gets created when the home…

… directory is not writable. Fixes race conditions on a multi-user machine discovered by Matt Anderson.
  • Loading branch information...
commit 0ee2e5def26c89b64ba5200d9256304d9c5c2331 1 parent 9eab454
@mdboom authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/matplotlib/__init__.py
View
4 lib/matplotlib/__init__.py
@@ -471,9 +471,11 @@ def _create_tmp_config_dir():
If the config directory can not be created, create a temporary
directory.
"""
+ import getpass
import tempfile
- tempdir = os.path.join(tempfile.gettempdir(), 'matplotlib')
+ tempdir = os.path.join(
+ tempfile.gettempdir(), 'matplotlib-%s' % getpass.getuser())
os.environ['MPLCONFIGDIR'] = tempdir
return tempdir
Please sign in to comment.
Something went wrong with that request. Please try again.