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)))
|
||||
if not checkstr == form["checkstr"].value:
|
||||
print("Captcha's wrong")
|
||||
raise Exception()
|
||||
raise SyntaxError()
|
||||
username=form["username"].value
|
||||
message=form["message"].value
|
||||
timestamp=int(time.time())
|
||||
data={"name":"","markdown":message,"author":username,"date":timestamp}
|
||||
storage.append("comments-%i"%aid,data)
|
||||
except:
|
||||
traceback.print_exc()
|
||||
except SyntaxError:
|
||||
pass
|
||||
|
||||
|
||||
seed=random.SystemRandom().randint(0,2**24)
|
||||
random.seed(seed)
|
||||
checkstr=list("".join(random.choice(string.digits+string.ascii_lowercase) for _ in range(5)))
|
||||
|
|
Loading…
Reference in a new issue