From 9f83bf42857291b1ad936da28bb75430f20ee3c1 Mon Sep 17 00:00:00 2001 From: masaru87 <55574641+masaru87@users.noreply.github.com> Date: Fri, 24 Jul 2026 00:30:13 +0900 Subject: [PATCH] =?UTF-8?q?Fix=20readKey=20=E6=9C=AA=E6=8C=87=E5=AE=9A?= =?UTF-8?q?=E6=99=82=E3=81=AB=20read/getprop=20=E3=81=8C=20TypeError=20?= =?UTF-8?q?=E3=81=A7=E5=A4=B1=E6=95=97=E3=81=99=E3=82=8B=E5=95=8F=E9=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ambient.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ambient.py b/ambient.py index 90884de..2566c55 100644 --- a/ambient.py +++ b/ambient.py @@ -52,7 +52,7 @@ def send(self, data, timeout = 30.0): def read(self, **args): url = self.url + '/data' __o = [] - if hasattr(self, 'readKey'): + if self.readKey is not None: __o.append('readKey=' + self.readKey) if 'date' in args: __o.append('date=' + args['date']) @@ -78,7 +78,7 @@ def read(self, **args): def getprop(self, **args): url = self.url - if hasattr(self, 'readKey'): + if self.readKey is not None: url = url + '?' + 'readKey=' + self.readKey timeout = 30.0 if 'timeout' in args: