Changeset 124
- Timestamp:
- 04/13/08 22:33:35 (6 months ago)
- Files:
-
- sucrose/trunk/python/cardswipe.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
sucrose/trunk/python/cardswipe.py
r117 r124 16 16 def authenticate_purchase(self, location): 17 17 try: 18 tray = self.sucrose.tray_from_location(location) )18 tray = self.sucrose.tray_from_location(location) 19 19 except ValueError: 20 20 raise 21 21 22 22 23 if tray.quantity > 0: 23 if self.sucrose.balance_for_user(self.sucrose.user_from_uin(self.uin)) >= tray.cur_price: 24 moneys = self.sucrose.balance_for_user(self.sucrose.user_from_uin(self.uin)) 25 if int(moneys*100) >= tray.cur_price*100: 24 26 return True 25 27 raise ValueError('not enough money')
