ramit.prasad at jpmorgan.com
Tue May 15 17:45:34 CEST 2012
>as you can see i only use some of the command. it doesnt produce an error message tho.. just repeats "return Error("<b>%s</b> I couldn't find %s anywhere", user.name.title(), name.title())"
Your problem might be is indenting of the else. It is indenting
to be a for...else loop. Which means that if nothing breaks out of the
loop it will always do what is in the else (which in this case returns
Error[...]) after the loop has finished running through the rooms.
for room in mgr.rooms:
if data == "join":
mgr.sendObject(target, Html("<b>%s</b>, <b><font color='#3399CC'>%s</font></b> wants to tell you <b><i>%s</i></b>", name.title, user.name.title$
return Error("<b>%s</b> I couldn't find %s anywhere", user.name.title(), name.title())
Why are you looping through the rooms and checking if data == "join"?
You do not even use the room object in the loop, and target is not defined
in the local scope, although I suppose you meant to use room instead.
This loop just "smells" to me.
Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology
712 Main Street | Houston, TX 77002
work phone: 713 - 216 - 5423
This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.
More information about the Tutor