From 55963da9bb0d93090b49b406ed3b0796acc6de1c Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Mon, 14 Dec 2015 19:53:34 +0100 Subject: [PATCH] Modem.py: use the more idiomatic "while True" instead of "while 1" --- src/savemysugar/Modem.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/savemysugar/Modem.py b/src/savemysugar/Modem.py index e510382..073b742 100755 --- a/src/savemysugar/Modem.py +++ b/src/savemysugar/Modem.py @@ -99,7 +99,7 @@ class Modem(object): resultlist = [] line = "" - while 1: + while True: data = self.serial.read(1) if len(data): line += data.decode('UTF-8') @@ -123,7 +123,7 @@ class Modem(object): line = "" def get_response_loop(self): - while 1: + while True: self.get_response() def register_callback(self, response, callback_func): -- 2.1.4