Skip to content

Commit

Permalink
update to 1.4.1 and fix no username bug
Browse files Browse the repository at this point in the history
  • Loading branch information
noahzark committed Aug 16, 2018
1 parent 76a806d commit a4be01f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

from dns_cache import _set_dns_cache

GRADER_VERSION = '1.4.0'
GRADER_VERSION = '1.4.1'

if __name__ == '__main__':
report_logger.info("QiwuGrader ver {0}".format(GRADER_VERSION))
Expand Down
5 changes: 3 additions & 2 deletions grader.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,9 @@ def init(self, config):

robots = []
if self.test_type == 'knowledge':
robots = config.get_config("usernames")
robots = config.get_config("usernames", None)
if not robots:
robots = [config.get_config("username")]
robots = config.get_config("username", None)
elif self.test_type == 'api':
robots = config.get_config('name', 'Unknown')

Expand Down Expand Up @@ -209,6 +209,7 @@ def test(self):

if self.robots is None or len(self.robots) == 0:
report_logger.error("Couldn't find username to test, grader exit")
return 0

for i, robot in enumerate(self.robots):
if self.print_info:
Expand Down

0 comments on commit a4be01f

Please sign in to comment.