Commit 64bde50
authored
It is possible but unlikely for the `python_tzpath_context` function to fail between the start of the `try` block and the point where `os.environ.get` succeeds, in which case `old_env` will be undefined. In this case, we want to take no action.
Practically speaking this will really only happen in an error condition anyway, so it doesn't really matter, but we should probably do it right anyway.
1 parent 53dceb5 commit 64bde50
File tree
2 files changed
+10
-1
lines changed- Lib/test/test_zoneinfo
- Misc/NEWS.d/next/Tests
2 files changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1543 | 1543 | | |
1544 | 1544 | | |
1545 | 1545 | | |
| 1546 | + | |
| 1547 | + | |
1546 | 1548 | | |
1547 | 1549 | | |
1548 | 1550 | | |
1549 | 1551 | | |
1550 | 1552 | | |
1551 | 1553 | | |
1552 | | - | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
1553 | 1560 | | |
1554 | 1561 | | |
1555 | 1562 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
0 commit comments