Commit 5bdcb08
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.
(cherry picked from commit 64bde50)
Co-authored-by: Paul Ganssle <[email protected]>
1 parent 2810787 commit 5bdcb08
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 | |
|---|---|---|---|
| |||
1530 | 1530 | | |
1531 | 1531 | | |
1532 | 1532 | | |
| 1533 | + | |
| 1534 | + | |
1533 | 1535 | | |
1534 | 1536 | | |
1535 | 1537 | | |
1536 | 1538 | | |
1537 | 1539 | | |
1538 | 1540 | | |
1539 | | - | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
1540 | 1547 | | |
1541 | 1548 | | |
1542 | 1549 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
0 commit comments