From c2c91b9f37f0f11c6b0634fd0cf3702b741a9890 Mon Sep 17 00:00:00 2001 From: Jordan Rodgers Date: Sun, 11 Feb 2018 22:02:06 -0500 Subject: [PATCH] remove secrets module for generating passwords until this works with python 3.6 --- proxstar/util.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/proxstar/util.py b/proxstar/util.py index af587ea..d91cd45 100644 --- a/proxstar/util.py +++ b/proxstar/util.py @@ -1,8 +1,7 @@ -import secrets +import string +import random -def gen_password( - length, - charset="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*" -): - return "".join([secrets.choice(charset) for _ in range(0, length)]) +def gen_password(length, charset="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*"): + # use secrets module once this works in python 3.6 + return ''.join(random.choice(charset) for x in range(length))