commit 2b34746acf669ae79d867c90fd31dec08ebefdeb parent 39d98e80a5b59eb71a8902fb990744236feea614 Author: NicholasFarrow <nicholas.w.farrow@gmail.com> Date: Sun, 27 Dec 2020 11:47:01 +1100 remove walrus Diffstat:
M | invoice/price_feed.py | | | 3 | ++- |
M | server.py | | | 4 | ++-- |
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/invoice/price_feed.py b/invoice/price_feed.py @@ -30,7 +30,8 @@ def get_price(currency): def get_btc_value(dollar_value, currency): - if (price := get_price(currency)) is not None: + price = get_price(currency)) + if price is not None: try: float_value = dollar_value / float(price) diff --git a/server.py b/server.py @@ -97,8 +97,8 @@ def process_payment(payment): # Track start_time for payment timeouts payment.start_time = time.time() - while (time_left := config.payment_timeout - (time.time() - payment.start_time)) > 0: - payment.time_left = time_left + while (config.payment_timeout - (time.time() - payment.start_time)) > 0: + payment.time_left = config.payment_timeout - (time.time() - payment.start_time) payment.confirmed_paid, payment.unconfirmed_paid = payment.check_payment() print() print(payment.__dict__)