Skip to content

make print functions more robust w.r.t. arguments being passed to format the message to be printed#2670

Merged
migueldiascosta merged 1 commit intoeasybuilders:developfrom
boegel:fix_print_functions
Nov 23, 2018
Merged

make print functions more robust w.r.t. arguments being passed to format the message to be printed#2670
migueldiascosta merged 1 commit intoeasybuilders:developfrom
boegel:fix_print_functions

Conversation

@boegel
Copy link
Copy Markdown
Member

@boegel boegel commented Nov 22, 2018

This avoids that print_warning("Example: %s", foo) gets interpreted as print_warning("Example: %s", silent=True), but as print_warning("Example: %s" % foo).

Strictly speaking, this is backwards incompatible, but if any code out there now uses print_warning(msg, arg) it's most likely not working as intended. And using print_warning with silent=True is quite silly anyway, that only makes sense in the tests.

@boegel boegel added this to the 3.8.0 milestone Nov 22, 2018
@boegel boegel requested a review from ocaisa November 22, 2018 20:35
Copy link
Copy Markdown
Member

@migueldiascosta migueldiascosta left a comment

Choose a reason for hiding this comment

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

lgtm

@migueldiascosta
Copy link
Copy Markdown
Member

Going in, thanks @boegel!

@migueldiascosta migueldiascosta merged commit 5e9c013 into easybuilders:develop Nov 23, 2018
@boegel boegel deleted the fix_print_functions branch November 23, 2018 17:41
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.

2 participants