From 7fa30c28689b0d33d148602a12c94546ecbf28a4 Mon Sep 17 00:00:00 2001 From: AliceGrey Date: Sun, 8 Dec 2019 17:16:05 -0800 Subject: [PATCH] Added text overflow checking for over 999 associations --- pwnagotchi/voice.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pwnagotchi/voice.py b/pwnagotchi/voice.py index b1abd8a5..b69fefcf 100644 --- a/pwnagotchi/voice.py +++ b/pwnagotchi/voice.py @@ -161,7 +161,10 @@ class Voice: def on_last_session_data(self, last_session): status = self._('Kicked {num} stations\n').format(num=last_session.deauthed) - status += self._('Made {num} new friends\n').format(num=last_session.associated) + if last_session.associated > 999: + status += self._('Made >999 new friends\n') + else: + status += self._('Made {num} new friends\n').format(num=last_session.associated) status += self._('Got {num} handshakes\n').format(num=last_session.handshakes) if last_session.peers == 1: status += self._('Met 1 peer')