Skip to content

Yesno returns the opposite of what we expect #32

Description

@pirods

Description

When using the yesno method, the results is a boolean which is actually the opposite of what described

Steps to Reproduce

  1. start a simple yesno
  2. select yes
  3. the resulting boolean is set to false

Actual result:

False

Expected result:

True

Reproduces how often:

Systematic

Version

  • Operating System: 12.3.1 MacOs
  • Python: 3.10.3
  • whiptail: 0.3.2

Installation source

PyPI/pip

Other Additional Information:

From dialog/whiptail docs: yesno return (0=yes, 1=no)

This bit of code:

return bool(self.run("yesno", msg, extra_args=[defaultno], exit_on=[255]).returncode)

should actually be:

return not bool(self.run("yesno", msg, extra_args=[defaultno], exit_on=[255]).returncode)

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingstale

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions