Fix random again
This commit is contained in:
parent
92020c4bbc
commit
1abda678a2
@ -1,3 +1,4 @@
|
|||||||
|
import datetime
|
||||||
import random
|
import random
|
||||||
|
|
||||||
class DOC_RandomPromptChoice:
|
class DOC_RandomPromptChoice:
|
||||||
@ -23,7 +24,6 @@ class DOC_RandomPromptChoice:
|
|||||||
if not prompts:
|
if not prompts:
|
||||||
return ("",)
|
return ("",)
|
||||||
sysrand = random.SystemRandom()
|
sysrand = random.SystemRandom()
|
||||||
|
sysrand.seed(datetime.datetime.now().timestamp())
|
||||||
choice = sysrand.choice(prompts)
|
choice = sysrand.choice(prompts)
|
||||||
idx = prompts.index(choice) + 1
|
|
||||||
print(f"[DOC_RandomPromptChoice] Scelta #{idx}: '{choice[:20]}'")
|
|
||||||
return (choice,)
|
return (choice,)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user