Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork940
Commit5039df3
committed
Eliminate duplicate rmtree try-except logic
In git.util.rmtree, exceptions are caught and conditionally(depending on the value of HIDE_WINDOWS_KNOWN_ERRORS) reraisedwrapped in a unittest.SkipTest exception. Although this logic ispart of git.util.rmtree itself, two of the calls to that rmtreefunction contain this same logic.This is not quite a refactoring: because SkipTest derives fromException, and Exception rather than PermissionError is beingcaught including in the duplicated logic, duplicated logic wheregit.util.rmtree was called added another layer of indirection inthe chained exceptions leading back to the original that was raisedin an unsuccessful attempt to delete a file or directory in rmtree.However, that appeared unintended and may be considered a minorbug. The new behavior, differing only subtly, is preferable.1 parentfba59aa commit5039df3
File tree
3 files changed
+5
-21
lines changed- git/objects/submodule
- test
3 files changed
+5
-21
lines changedLines changed: 2 additions & 18 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
29 | 29 |
| |
30 | 30 |
| |
31 | 31 |
| |
32 |
| - | |
33 | 32 |
| |
34 | 33 |
| |
35 | 34 |
| |
| |||
1060 | 1059 |
| |
1061 | 1060 |
| |
1062 | 1061 |
| |
1063 |
| - | |
1064 |
| - | |
1065 |
| - | |
1066 |
| - | |
1067 |
| - | |
1068 |
| - | |
1069 |
| - | |
1070 |
| - | |
| 1062 | + | |
1071 | 1063 |
| |
1072 | 1064 |
| |
1073 | 1065 |
| |
1074 | 1066 |
| |
1075 | 1067 |
| |
1076 |
| - | |
1077 |
| - | |
1078 |
| - | |
1079 |
| - | |
1080 |
| - | |
1081 |
| - | |
1082 |
| - | |
1083 |
| - | |
1084 |
| - | |
| 1068 | + | |
1085 | 1069 |
| |
1086 | 1070 |
| |
1087 | 1071 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
24 |
| - | |
25 |
| - | |
| 24 | + | |
| 25 | + | |
26 | 26 |
| |
27 | 27 |
| |
28 | 28 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
458 | 458 |
| |
459 | 459 |
| |
460 | 460 |
| |
461 |
| - | |
| 461 | + | |
462 | 462 |
| |
463 | 463 |
| |
464 | 464 |
| |
|
0 commit comments
Comments
(0)