From 5e0d0fe4f2014e5146b5a94fbcdf89835ad990ee Mon Sep 17 00:00:00 2001 From: Zach Huntington-Meath Date: Tue, 5 May 2026 08:21:04 -0400 Subject: [PATCH] Fix TypeError in _ensure_bool: str has no attribute 'tolower' _ensure_bool introduced in 438bdc8e used .tolower() instead of .lower(), causing incremental content exports to fail. closes #7678 Assisted-By: Claude Sonnet 4.6 (cherry picked from commit 305163c4e3391388839050b5e970340c393b1aed) --- CHANGES/7678.bugfix | 1 + pulpcore/app/tasks/export.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 CHANGES/7678.bugfix diff --git a/CHANGES/7678.bugfix b/CHANGES/7678.bugfix new file mode 100644 index 00000000000..81f25245235 --- /dev/null +++ b/CHANGES/7678.bugfix @@ -0,0 +1 @@ +Fixed `TypeError: 'str' object has no attribute 'tolower'` in `_ensure_bool` during incremental content exports. Changed `.tolower()` to `.lower()`. diff --git a/pulpcore/app/tasks/export.py b/pulpcore/app/tasks/export.py index 3e7ee12cdf8..cc143baf22d 100644 --- a/pulpcore/app/tasks/export.py +++ b/pulpcore/app/tasks/export.py @@ -46,9 +46,9 @@ def _ensure_bool(value): if isinstance(value, bool): return value if isinstance(value, str): - if value.tolower() in ["yes", "y", "true", "t", "on", "1"]: + if value.lower() in ["yes", "y", "true", "t", "on", "1"]: return True - if value.tolower() in ["no", "n", "false", "f", "off", "0"]: + if value.lower() in ["no", "n", "false", "f", "off", "0"]: return False if value == 1: return True