<s> from decimal import Decimal <EOL> from market . models import Price <EOL> tiers = """<STR_LIT>""" <EOL> def run ( ) : <EOL> for tier in tiers . strip ( ) . split ( '<STR_LIT:\n>' ) : <EOL> if not tier . strip ( ) : <EOL> continue <EOL> name , amount = tier . strip ( ) . split ( '<STR_LIT:U+0020>' ) <EOL> try : <EOL> tier = Price . objects . get ( price = Decimal ( amount ) ) <EOL> except Price . DoesNotExist : <EOL> print '<STR_LIT>' % amount <EOL> continue <EOL> tier . name = name <EOL> tier . save ( ) <EOL> print '<STR_LIT>' % ( amount , name ) </s>
