Skip to content

Fix TypeError in _ensure_bool: str has no attribute 'tolower'#7679

Merged
ggainey merged 1 commit intopulp:mainfrom
zjhuntin:fix-ensure-bool-tolower
May 5, 2026
Merged

Fix TypeError in _ensure_bool: str has no attribute 'tolower'#7679
ggainey merged 1 commit intopulp:mainfrom
zjhuntin:fix-ensure-bool-tolower

Conversation

@zjhuntin
Copy link
Copy Markdown
Contributor

@zjhuntin zjhuntin commented May 5, 2026

Summary

_ensure_bool in pulpcore/app/tasks/export.py (introduced in 438bdc8) calls value.tolower() which does not exist on Python strings. This causes incremental content exports to fail with:

Error: 'str' object has no attribute 'tolower'

Fix changes both occurrences to value.lower().

🤖 Generated with Claude Code

Copy link
Copy Markdown
Contributor

@ggainey ggainey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zach - 7571 is fixed, this is its own bugfix. You can add changelog entries without a specific github issue - see https://pulpproject.org/pulpcore/docs/dev/guides/git/#changelog-update , you can name the changefile something like "+fix_ensure_bool.bugfix"

@jobselko
Copy link
Copy Markdown
Member

jobselko commented May 5, 2026

We actually have an issue for this. @zjhuntin Could you please update your commit to mention #7678?

Comment thread CHANGES/7678.bugfix
@ggainey
Copy link
Copy Markdown
Contributor

ggainey commented May 5, 2026

We actually have an issue for this. @zjhuntin Could you please update your commit to mention #7678?

Good catch - that will teach me to respond without searching first... :)

@zjhuntin
Copy link
Copy Markdown
Contributor Author

zjhuntin commented May 5, 2026

Apologies, will update it, thank you all for the feedback! 😄

_ensure_bool introduced in 438bdc8 used .tolower() instead of .lower(),
causing incremental content exports to fail.

closes pulp#7678

Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@zjhuntin zjhuntin force-pushed the fix-ensure-bool-tolower branch from b642c4b to 1596a91 Compare May 5, 2026 14:30
@ggainey ggainey enabled auto-merge (rebase) May 5, 2026 15:01
@ggainey ggainey merged commit 305163c into pulp:main May 5, 2026
13 of 14 checks passed
@patchback
Copy link
Copy Markdown

patchback Bot commented May 5, 2026

Backport to 3.110: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.110/305163c4e3391388839050b5e970340c393b1aed/pr-7679

Backported as #7680

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@ianballou
Copy link
Copy Markdown

Katello would like to request a 3.105 backport for this.

@ggainey
Copy link
Copy Markdown
Contributor

ggainey commented May 5, 2026

Katello would like to request a 3.105 backport for this.

Will backport to everything the original PR (#7651) went to.

@patchback
Copy link
Copy Markdown

patchback Bot commented May 5, 2026

Backport to 3.49: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.49/305163c4e3391388839050b5e970340c393b1aed/pr-7679

Backported as #7684

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@patchback
Copy link
Copy Markdown

patchback Bot commented May 5, 2026

Backport to 3.63: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.63/305163c4e3391388839050b5e970340c393b1aed/pr-7679

Backported as #7685

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@patchback
Copy link
Copy Markdown

patchback Bot commented May 5, 2026

Backport to 3.73: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.73/305163c4e3391388839050b5e970340c393b1aed/pr-7679

Backported as #7683

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@patchback
Copy link
Copy Markdown

patchback Bot commented May 5, 2026

Backport to 3.85: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.85/305163c4e3391388839050b5e970340c393b1aed/pr-7679

Backported as #7681

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@patchback
Copy link
Copy Markdown

patchback Bot commented May 5, 2026

Backport to 3.105: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.105/305163c4e3391388839050b5e970340c393b1aed/pr-7679

Backported as #7682

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants