Skip to content

Commit 5042f2f

Browse files
authored
Add AttributeError
1 parent 362dbab commit 5042f2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/socket.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def __getattr__(name):
7272
import warnings
7373
warnings.warn(f"{name} is deprecated", DeprecationWarning)
7474
return _socket.socket
75-
75+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
7676
# Set up the socket.AF_* socket.SOCK_* constants as members of IntEnums for
7777
# nicer string representations.
7878
# Note that _socket only knows about the integer values. The public interface

0 commit comments

Comments
 (0)