Changeset 124

Show
Ignore:
Timestamp:
04/13/08 22:33:35 (6 months ago)
Author:
njriley
Message:

fix wit issues

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sucrose/trunk/python/cardswipe.py

    r117 r124  
    1616        def authenticate_purchase(self, location): 
    1717                try: 
    18                         tray = self.sucrose.tray_from_location(location)) 
     18                        tray = self.sucrose.tray_from_location(location) 
    1919                except ValueError: 
    2020                        raise 
    2121                 
     22                 
    2223                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: 
    2426                                return True 
    2527                        raise ValueError('not enough money')