Browse Source

Merge branch 'improve-randomness' of framasky/masto-image-bot into master

master
Dryusdan 1 year ago
committed by Gitea
parent
commit
fa1550e26a
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      bot.py

+ 2
- 1
bot.py View File

@@ -32,7 +32,8 @@ def post_img_local(mastodon, text, log, config):

continu = True;
while continu:
file = random.choice(os.listdir(img_path+"/"))
secure_random = random.SystemRandom()
file = secure_random.choice(os.listdir(img_path+"/"))
if os.path.isdir(img_path+file):
img_path = img_path+file+"/"
else:


Loading…
Cancel
Save