Changeset 117
- Timestamp:
- 04/13/08 21:39:25 (6 months ago)
- Files:
-
- sucrose/trunk/python/cardswipe.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
sucrose/trunk/python/cardswipe.py
r111 r117 15 15 16 16 def authenticate_purchase(self, location): 17 return True # XXX wit, fix it 18 17 try: 18 tray = self.sucrose.tray_from_location(location)) 19 except ValueError: 20 raise 21 22 if tray.quantity > 0: 23 if self.sucrose.balance_for_user(self.sucrose.user_from_uin(self.uin)) >= tray.cur_price: 24 return True 25 raise ValueError('not enough money') 26 raise ValueError('tray is empty') 19 27 20 28 def authenticated_user(self):
