From a95ed923baa2744a5aa736c307b3530b4896bb6b Mon Sep 17 00:00:00 2001 From: Stijn Dickx <82111073+sd-personal@users.noreply.github.com> Date: Thu, 8 Apr 2021 22:23:05 +0200 Subject: [PATCH] Fixes an issue where the API was returning numerical value 0 but the library converted it to None --- fsapi/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fsapi/__init__.py b/fsapi/__init__.py index 7112a99..dffb470 100644 --- a/fsapi/__init__.py +++ b/fsapi/__init__.py @@ -91,7 +91,7 @@ def handle_int(self, item): if doc is None: return None - return int(doc.value.u8.text) or None + return int(doc.value.u8.text) # returns an int, assuming the value does not exceed 8 bits def handle_long(self, item): @@ -99,7 +99,7 @@ def handle_long(self, item): if doc is None: return None - return int(doc.value.u32.text) or None + return int(doc.value.u32.text) def handle_list(self, item): doc = self.call('LIST_GET_NEXT/'+item+'/-1', dict(