From d7980400cb13ff8962516771bff56c2fcc6a943d Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Mon, 23 Mar 2020 19:54:41 -0700 Subject: [PATCH] Use bool(x) instead of 1 if x else 0. --- src/mega/mega.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mega/mega.py b/src/mega/mega.py index d92a488..6e72383 100644 --- a/src/mega/mega.py +++ b/src/mega/mega.py @@ -517,7 +517,7 @@ class Mega: 'total' : the maximum space allowed with current plan All storage space are in bytes unless asked differently. """ - if sum(1 if x else 0 for x in (kilo, mega, giga)) > 1: + if sum(bool(x) for x in (kilo, mega, giga)) > 1: raise ValueError("Only one unit prefix can be specified") unit_coef = 1 if kilo: