Commit a820d0d
committed
pySCG: fix invalid Path() kwarg in CWE-798 compliant example
Remove invalid 'exist_ok=True' parameter from Path() constructor.
This parameter belongs to Path.mkdir(), not Path(). The invalid
usage triggers DeprecationWarning in Python 3.12+ and will cause
errors in Python 3.14+.
The file is created by open() on the next line, so exist_ok was
never needed here. This is a bug fix with no behavior change.
Signed-off-by: tommcd <[email protected]>1 parent c0dfba9 commit a820d0d
File tree
1 file changed
+1
-2
lines changed- docs/Secure-Coding-Guide-for-Python/CWE-693/CWE-798
1 file changed
+1
-2
lines changedLines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
| |||
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
46 | | - | |
| 45 | + | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
| |||
0 commit comments