Skip to content

Commit dd4a0d1

Browse files
committed
interpret empty string as None
1 parent 639f377 commit dd4a0d1

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

action.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,4 @@ runs:
3636
ENVIRONMENT_PATHS: ${{ inputs.environment-paths }}
3737
TODAY: ${{ inputs.today }}
3838
run: |
39-
if [[ "$TODAY" != "" ]]; then
40-
opts=(--today="$TODAY")
41-
else
42-
opts=()
43-
fi
44-
python minimum_versions.py "$opts" --policy="$POLICY_PATH" $ENVIRONMENT_PATHS
39+
python minimum_versions.py --today="$TODAY" --policy="$POLICY_PATH" $ENVIRONMENT_PATHS

minimum_versions.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,9 @@ def format_bump_table(specs, policy_versions, releases, warnings, ignored_violat
315315

316316

317317
def parse_date(string):
318+
if not string:
319+
return None
320+
318321
return datetime.datetime.strptime(string, "%Y-%m-%d").date()
319322

320323

0 commit comments

Comments
 (0)