Remove all uses of assignment expressions.

This is needed to port to Python 3.7 because
Raspbian 10 doesn't have Python 3.8.

Signed-off-by: Oleg Girko <ol@infoserver.lv>
This commit is contained in:
Oleg Girko
2020-08-18 03:44:06 +03:00
parent 5307765399
commit 2dbf11428f
9 changed files with 30 additions and 18 deletions

View File

@@ -109,10 +109,11 @@ class HwInfoSubmanager(BaseInfoSubmanager):
async def __get_throttling(self) -> Optional[Dict]:
# https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=147781&start=50#p972790
if (flags := await self.__parse_vcgencmd(
flags = await self.__parse_vcgencmd(
arg="get_throttled",
parser=(lambda text: int(text.split("=")[-1].strip(), 16)),
)) is not None:
)
if flags is not None:
return {
"raw_flags": flags,
"parsed_flags": {