[PEP-654] add None check in subgroup example (GH-2132)
Joe Gottman alerted us to an error in this example, which is missing a None check.
This commit is contained in:
parent
00cb14dd23
commit
0098f08851
|
@ -1023,7 +1023,9 @@ OS errors, while letting all other exceptions propagate.
|
||||||
try:
|
try:
|
||||||
low_level_os_operation()
|
low_level_os_operation()
|
||||||
except* OSError as errors:
|
except* OSError as errors:
|
||||||
raise errors.subgroup(lambda e: e.errno != errno.EPIPE) from None
|
exc = errors.subgroup(lambda e: e.errno != errno.EPIPE)
|
||||||
|
if exc is not None:
|
||||||
|
raise exc from None
|
||||||
|
|
||||||
|
|
||||||
Caught Exception Objects
|
Caught Exception Objects
|
||||||
|
@ -1478,7 +1480,7 @@ ways, both the design and the exposition. For this we appreciate all those who
|
||||||
contributed ideas and asked good questions: Ammar Askar, Matthew Barnett,
|
contributed ideas and asked good questions: Ammar Askar, Matthew Barnett,
|
||||||
Ran Benita, Emily Bowman, Brandt Bucher, Joao Bueno, Baptiste Carvello,
|
Ran Benita, Emily Bowman, Brandt Bucher, Joao Bueno, Baptiste Carvello,
|
||||||
Rob Cliffe, Nick Coghlan, Steven D'Aprano, Caleb Donovick, Steve Dower,
|
Rob Cliffe, Nick Coghlan, Steven D'Aprano, Caleb Donovick, Steve Dower,
|
||||||
Greg Ewing, Ethan Furman, Pablo Salgado, Jonathan Goble, Thomas Grainger,
|
Greg Ewing, Ethan Furman, Pablo Salgado, Jonathan Goble, Joe Gottman, Thomas Grainger,
|
||||||
Larry Hastings, Zac Hatfield-Dodds, Chris Jerdonek, Jim Jewett, Sven Kunze,
|
Larry Hastings, Zac Hatfield-Dodds, Chris Jerdonek, Jim Jewett, Sven Kunze,
|
||||||
Łukasz Langa, Glenn Linderman, Paul Moore, Antoine Pitrou, Ivan Pozdeev,
|
Łukasz Langa, Glenn Linderman, Paul Moore, Antoine Pitrou, Ivan Pozdeev,
|
||||||
Patrick Reader, Terry Reedy, Sascha Schlemmer, Barry Scott, Mark Shannon,
|
Patrick Reader, Terry Reedy, Sascha Schlemmer, Barry Scott, Mark Shannon,
|
||||||
|
|
Loading…
Reference in New Issue