Commit b8e009e
committed
In rmtree, have onerror catch only PermissionError
The onerror function is still called on, and tries to resolve, any
exception. But now, when it re-calls the file deletion function
passed as func, the only exception it catches to conditionally
convert to SkipTest is PermissionError (or derived exceptions).
The old behavior of catching Exception was overly broad, and
inconsistent with the hard-coded prefix of "FIXME: fails with:
PermissionError" used to build the SkipTest exception messages.
This commit also changes the message to use an f-string (which was
one of the styles in the equivalent but differently coded duplicate
logic eliminated in 5039df3, and seems clearer in this case). That
change is a pure refactoring, not affecting generated messages.1 parent 2a32e25 commit b8e009e
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
| 191 | + | |
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
| 195 | + | |
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| |||
0 commit comments