Bruker less til liste over kjøpte produkter for en bruker.

This commit is contained in:
Øystein Ingmar Skartsæterhagen 2011-01-31 15:37:11 +00:00
parent 8d777ffb9a
commit 94976a0fd6
1 changed files with 5 additions and 3 deletions

View File

@ -672,7 +672,6 @@ class ShowUserMenu(Menu):
self.print_all_transactions(user) self.print_all_transactions(user)
elif what == 'products': elif what == 'products':
self.print_purchased_products(user) self.print_purchased_products(user)
self.pause()
else: else:
print 'What what?' print 'What what?'
@ -731,9 +730,12 @@ class ShowUserMenu(Menu):
if num_products == 0: if num_products == 0:
print 'No products purchased yet' print 'No products purchased yet'
else: else:
print 'Products purchased:' text = ''
text += 'Products purchased:\n'
for product in products: for product in products:
print ('%-'+str(Product.name_length)+'s %3i') % (product, products[product]) text += ('%-'+str(Product.name_length)+'s %3i\n') \
% (product, products[product])
less(text)
class UserListMenu(Menu): class UserListMenu(Menu):