Skip to content

Commit

Permalink
Rename run_time_str to be more good and less bad
Browse files Browse the repository at this point in the history
  • Loading branch information
KaspariK committed Jan 17, 2025
1 parent 6858246 commit 177800a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tron/core/jobrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ def from_json(state_data: str):
"""Deserialize the JobRun instance from a JSON string."""
try:
json_data = json.loads(state_data)
run_time_str = json_data["run_time"]
if run_time_str:
run_time = datetime.datetime.fromisoformat(run_time_str)
raw_run_time = json_data["run_time"]
if raw_run_time:
run_time = datetime.datetime.fromisoformat(raw_run_time)
if json_data["time_zone"]:
tz = pytz.timezone(json_data["time_zone"])
run_time = tz.localize(run_time)
Expand Down

0 comments on commit 177800a

Please sign in to comment.