mirror of
https://github.com/python/cpython.git
synced 2025-08-22 01:35:16 +00:00
Merged revisions 77970 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r77970 | antoine.pitrou | 2010-02-04 21:20:18 +0100 (jeu., 04 févr. 2010) | 6 lines Issue #4772: Raise a ValueError when an unknown Bluetooth protocol is specified, rather than fall through to AF_PACKET (in the `socket` module). Also, raise ValueError rather than TypeError when an unknown TIPC address type is specified. Patch by Brian Curtin. ........
This commit is contained in:
parent
f85bba5431
commit
6e127db0ed
2 changed files with 10 additions and 1 deletions
|
@ -58,6 +58,11 @@ Core and Builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Issue #4772: Raise a ValueError when an unknown Bluetooth protocol is
|
||||||
|
specified, rather than fall through to AF_PACKET (in the `socket` module).
|
||||||
|
Also, raise ValueError rather than TypeError when an unknown TIPC address
|
||||||
|
type is specified. Patch by Brian Curtin.
|
||||||
|
|
||||||
- Issue #6939: Fix file I/O objects in the `io` module to keep the original
|
- Issue #6939: Fix file I/O objects in the `io` module to keep the original
|
||||||
file position when calling `truncate()`. It would previously change the
|
file position when calling `truncate()`. It would previously change the
|
||||||
file position to the given argument, which goes against the tradition of
|
file position to the given argument, which goes against the tradition of
|
||||||
|
|
|
@ -1089,6 +1089,10 @@ makesockaddr(int sockfd, struct sockaddr *addr, int addrlen, int proto)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
default:
|
||||||
|
PyErr_SetString(PyExc_ValueError,
|
||||||
|
"Unknown Bluetooth protocol");
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1140,7 +1144,7 @@ makesockaddr(int sockfd, struct sockaddr *addr, int addrlen, int proto)
|
||||||
0,
|
0,
|
||||||
a->scope);
|
a->scope);
|
||||||
} else {
|
} else {
|
||||||
PyErr_SetString(PyExc_TypeError,
|
PyErr_SetString(PyExc_ValueError,
|
||||||
"Invalid address type");
|
"Invalid address type");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue