Skip to content

Set correct pull request message for --dry-run case#320

Merged
robwoolley merged 1 commit intoros-infrastructure:masterfrom
robwoolley:fix-typeerror
Aug 1, 2025
Merged

Set correct pull request message for --dry-run case#320
robwoolley merged 1 commit intoros-infrastructure:masterfrom
robwoolley:fix-typeerror

Conversation

@robwoolley
Copy link
Contributor

When --only is used, if --dry-run is used it calls save_pr(), otherwise file_pr() is called. This fix ensures that the same string value is passed to the delta parameter of both functions.

The call to save_pr was incorrectly passing the list args.only instead of the string delta which contains the contents of args.only

This caused a TypeError exception in get_pr_text when concatenating the list to a string.

File ".../superflore/superflore/utils.py", line 59, in get_pr_text
msg += '\n' + delta + '\n'
~~~~~^~~~~~~
TypeError: can only concatenate str (not "list") to str

When --only is used, if --dry-run is used it calls save_pr(), otherwise
file_pr() is called. This fix ensures that the same string value is
passed to the delta parameter of both functions.

The call to save_pr was incorrectly passing the list args.only instead
of the string delta which contains the contents of args.only

This caused a TypeError exception in get_pr_text when concatenating
the list to a string.

  File ".../superflore/superflore/utils.py", line 59, in get_pr_text
    msg += '\n' + delta + '\n'
           ~~~~~^~~~~~~
  TypeError: can only concatenate str (not "list") to str

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
@robwoolley robwoolley merged commit 0a6188b into ros-infrastructure:master Aug 1, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants