Skip to content

Commit

Permalink
Fix test_properties command logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuz666 committed Nov 5, 2021
1 parent dfca4ce commit 65998f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions miio/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,10 @@ def test_properties(self, properties):
"""Helper to test device properties."""

def ok(x):
click.echo(click.style(x, fg="green", bold=True))
click.echo(click.style(str(x), fg="green", bold=True))

def fail(x):
click.echo(click.style(x, fg="red", bold=True))
click.echo(click.style(str(x), fg="red", bold=True))

try:
model = self.info().model
Expand Down Expand Up @@ -293,7 +293,7 @@ def fail(x):

props_to_test = list(valid_properties.keys())
max_properties = -1
while len(props_to_test) > 1:
while len(props_to_test) > 0:
try:
click.echo(
f"Testing {len(props_to_test)} properties at once ({' '.join(props_to_test)}): ",
Expand Down

0 comments on commit 65998f4

Please sign in to comment.