Better?
This commit is contained in:
parent
5274b1968e
commit
770390b635
1 changed files with 3 additions and 3 deletions
|
@ -17,16 +17,16 @@ try:
|
||||||
checkstr=list("".join(random.choice(string.digits+string.ascii_lowercase) for _ in range(5)))
|
checkstr=list("".join(random.choice(string.digits+string.ascii_lowercase) for _ in range(5)))
|
||||||
if not checkstr == form["checkstr"].value:
|
if not checkstr == form["checkstr"].value:
|
||||||
print("Captcha's wrong")
|
print("Captcha's wrong")
|
||||||
raise Exception()
|
raise SyntaxError()
|
||||||
username=form["username"].value
|
username=form["username"].value
|
||||||
message=form["message"].value
|
message=form["message"].value
|
||||||
timestamp=int(time.time())
|
timestamp=int(time.time())
|
||||||
data={"name":"","markdown":message,"author":username,"date":timestamp}
|
data={"name":"","markdown":message,"author":username,"date":timestamp}
|
||||||
storage.append("comments-%i"%aid,data)
|
storage.append("comments-%i"%aid,data)
|
||||||
except:
|
except SyntaxError:
|
||||||
traceback.print_exc()
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
seed=random.SystemRandom().randint(0,2**24)
|
seed=random.SystemRandom().randint(0,2**24)
|
||||||
random.seed(seed)
|
random.seed(seed)
|
||||||
checkstr=list("".join(random.choice(string.digits+string.ascii_lowercase) for _ in range(5)))
|
checkstr=list("".join(random.choice(string.digits+string.ascii_lowercase) for _ in range(5)))
|
||||||
|
|
Loading…
Reference in a new issue