File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -256,6 +256,7 @@ Ondřej Súkup
256256Oscar Benjamin
257257Parth Patel
258258Patrick Hayes
259+ Paul Müller
259260Pauli Virtanen
260261Pavel Karateev
261262Paweł Adamczak
Original file line number Diff line number Diff line change 1+ Fix a bizarre (and fortunately rare) bug where the `temp_path ` fixture could raise
2+ an internal error while attempting to get the current user's username.
Original file line number Diff line number Diff line change @@ -158,9 +158,10 @@ def getbasetemp(self) -> Path:
158158def get_user () -> Optional [str ]:
159159 """Return the current user name, or None if getuser() does not work
160160 in the current environment (see #1010)."""
161- import getpass
162-
163161 try :
162+ # In some exotic environments, getpass may not be importable.
163+ import getpass
164+
164165 return getpass .getuser ()
165166 except (ImportError , KeyError ):
166167 return None
You can’t perform that action at this time.
0 commit comments