From ed718fa4383bcc994825758c870e31cff045e5b9 Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Mon, 11 Feb 2019 13:18:56 +0800 Subject: [PATCH] Trying Fix : Duplicated User had shown at Lottery finished --- Struct/Lottery.py | 3 +++ api.py | 1 + 2 files changed, 4 insertions(+) diff --git a/Struct/Lottery.py b/Struct/Lottery.py index a141098..904cf20 100644 --- a/Struct/Lottery.py +++ b/Struct/Lottery.py @@ -1,3 +1,4 @@ +# coding=utf-8 import requests import time from .LuckyUser import LuckyUser @@ -56,6 +57,8 @@ class Lottery: if self.isFinished: for i in d["lottery_info"]["lucky_users"]: self.luckyUsers.append(LuckyUser(i)) + else: + self.luckyUsers = [] def __str__(self): if self.isFinished: diff --git a/api.py b/api.py index 3c39802..ab755f3 100644 --- a/api.py +++ b/api.py @@ -1,3 +1,4 @@ +# coding=utf-8 import json import sys