Repository navigation
Commit 24ff33a
committed
fix: use str2time() instead of datetime.fromisoformat() in is_running() and load_plan()
datetime.fromisoformat() on Python 3.9/3.10 rejects ISO strings with
colon-less UTC offsets (e.g. '+0100'), which raises ValueError inside
is_running() and reports a false unhealthy status, and drops the saved
plan in load_plan(). str2time() in utils.py already parses these formats
across Python versions via a strptime fallback.
Also widens the is_running() except clause to (ValueError, TypeError)
to match load_plan().
Fixes #51811 parent d7d8c60 commit 24ff33a
1 file changed
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| |||
843 | 844 | | |
844 | 845 | | |
845 | 846 | | |
846 | | - | |
| 847 | + | |
847 | 848 | | |
848 | 849 | | |
849 | 850 | | |
| |||
1984 | 1985 | | |
1985 | 1986 | | |
1986 | 1987 | | |
1987 | | - | |
1988 | | - | |
| 1988 | + | |
| 1989 | + | |
1989 | 1990 | | |
1990 | 1991 | | |
1991 | 1992 | | |
| |||
0 commit comments