Remove stink str() conversions.
This commit is contained in:
parent
b77ef20fed
commit
75b9a01928
1 changed files with 5 additions and 5 deletions
10
lolbot.py
10
lolbot.py
|
|
@ -213,8 +213,8 @@ class LolBot(SingleServerIRCBot):
|
|||
self.quiz += 1
|
||||
self.tip = 0
|
||||
self.question = random.choice(self.qb)
|
||||
print(str(self.question.question))
|
||||
self.connection.notice(self.channel, "Question %s: %s" % (self.quiz, str(self.question.question)))
|
||||
print(self.question.question)
|
||||
self.connection.notice(self.channel, "Question %s: %s" % (self.quiz, self.question.question))
|
||||
|
||||
def quiz_tip(self):
|
||||
if len(self.question.tip) > self.tip:
|
||||
|
|
@ -315,10 +315,10 @@ class LolBot(SingleServerIRCBot):
|
|||
elif cmd == 'ask':
|
||||
if self.quiz:
|
||||
c.notice(self.channel, "Quiz is running. Use halt or quit to stop.")
|
||||
c.notice(self.channel, str(self.question.question))
|
||||
c.notice(self.channel, self.question.question)
|
||||
elif isinstance(self.question, Question):
|
||||
c.notice(self.channel, "There is an unanswered question.")
|
||||
c.notice(self.channel, str(self.question.question))
|
||||
c.notice(self.channel, self.question.question)
|
||||
else:
|
||||
self.start_quiz(nick)
|
||||
|
||||
|
|
@ -408,7 +408,7 @@ class LolBot(SingleServerIRCBot):
|
|||
try:
|
||||
(options, args) = getopt.getopt(sys.argv[1:], 'hc:s:p:j:n:d:', ['help', 'config=', 'server=', 'port=', 'join=', 'nick=', 'database=', ])
|
||||
except getopt.GetoptError as err:
|
||||
print(str(err))
|
||||
print(err)
|
||||
LolBot.usage()
|
||||
sys.exit(2)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue