Skip to content

Commit c073a61

Browse files
authored
Merge pull request RustPython#3598 from hwi-ya/timeout
Modify timeout print message
2 parents 3d5d3fd + 53a74a1 commit c073a61

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

stdlib/src/socket.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -661,14 +661,11 @@ mod _socket {
661661
vm.ctx.exceptions.os_error.to_owned()
662662
}
663663

664-
#[pyattr(once)]
664+
#[pyattr]
665665
fn timeout(vm: &VirtualMachine) -> PyTypeRef {
666-
vm.ctx.new_exception_type(
667-
"socket",
668-
"timeout",
669-
Some(vec![vm.ctx.exceptions.os_error.to_owned()]),
670-
)
666+
vm.ctx.exceptions.timeout_error.to_owned()
671667
}
668+
672669
#[pyattr(once)]
673670
fn herror(vm: &VirtualMachine) -> PyTypeRef {
674671
vm.ctx.new_exception_type(

0 commit comments

Comments
 (0)