Skip to content

Commit

Permalink
fix a potential bug in py3
Browse files Browse the repository at this point in the history
  • Loading branch information
noahzark committed May 9, 2018
1 parent e8ceb00 commit b430f69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions grader.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

class Grader():

ERROR_REPLY = u'服务器通信错误。'
ERROR_REPLY = u'服务器通信错误。'.encode('utf-8')

def __init__(self):
self.config = {}
Expand Down Expand Up @@ -94,7 +94,7 @@ def test_robot(self, name, questions, answers):
if response.find(answer_str) != -1:
correct = True
else:
if to_str(response) == self.ERROR_REPLY:
if response == self.ERROR_REPLY:
correct = False

if correct:
Expand Down

0 comments on commit b430f69

Please sign in to comment.