Skip to content

Commit 1d831b8

Browse files
fix: catch OSError from getpass.getuser on Python 3.13+
1 parent 1aa9cfc commit 1d831b8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

aiomysql/connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
try:
4242
DEFAULT_USER = getpass.getuser()
43-
except KeyError:
43+
except (KeyError, OSError):
4444
DEFAULT_USER = "unknown"
4545

4646

0 commit comments

Comments
 (0)