From 6000e46ad7b1008719f30692e96f958c22f94ecb Mon Sep 17 00:00:00 2001 From: simon987 Date: Sun, 3 Feb 2019 09:15:04 -0500 Subject: [PATCH] compatibility fix for python 3.5 --- captcha.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/captcha.py b/captcha.py index 7b80dcd..42fee89 100644 --- a/captcha.py +++ b/captcha.py @@ -152,7 +152,7 @@ def horizontal_lines(draw, c, line_par, line_pos, fill): def make_captcha(): color_name, color = random.choice(list(cfg["colors"].items())) - text = ''.join(random.choices(string.ascii_uppercase + string.digits, k=cfg["text"]["letters"][letter_count]["count"])) + text = ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(cfg["text"]["letters"][letter_count]["count"])) path = get_path(text)