From d9a91a7aa93b906790ecdcb54ec9ecbdc012852b Mon Sep 17 00:00:00 2001 From: Christoffer Viken Date: Mon, 20 Feb 2017 12:29:30 +0000 Subject: [PATCH] --- text_interface/buymenu.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/text_interface/buymenu.py b/text_interface/buymenu.py index 8183857..8e197f2 100644 --- a/text_interface/buymenu.py +++ b/text_interface/buymenu.py @@ -115,8 +115,10 @@ When finished, write an empty line to confirm the purchase.\n''' # Read in a 'thing' (product or user): line = self.input_multiple(add_nonexisting=('user', 'product'), empty_input_permitted=True, find_hidden_products=False) - - thing, num = line + if line is not None: + thing, num = line + else: + thing, num = None, 0 # Possibly exit from the menu: if thing is None: