From 8fb52a3f37db787913299e6834440de0ca1ac93c Mon Sep 17 00:00:00 2001 From: "Peter F. Patel-Schneider" Date: Mon, 17 Feb 2020 09:58:24 -0500 Subject: [PATCH] ui: don't show warning in pairing window for receivers with unlimited pairing --- lib/solaar/ui/pair_window.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/solaar/ui/pair_window.py b/lib/solaar/ui/pair_window.py index 915631f6..b871228a 100644 --- a/lib/solaar/ui/pair_window.py +++ b/lib/solaar/ui/pair_window.py @@ -202,7 +202,7 @@ def create(receiver): assistant.set_role('pair-device') page_text = _("If the device is already turned on, turn if off and on again.") - if receiver.remaining_pairings(): + if receiver.remaining_pairings() and receiver.remaining_pairings() >= 0: page_text += _("\n\nThis receiver has %d pairing(s) remaining.")%receiver.remaining_pairings() page_text += _("\nCancelling at this point will not use up a pairing.")