TypeError: 'float' object cannot be interpreted as an integer
This commit is contained in:
@ -10,10 +10,10 @@ _basedir = os.path.abspath(os.path.dirname(__file__))
|
||||
|
||||
# generate random secrets for unittest
|
||||
def get_random_secret(length):
|
||||
secret_key = ''.join(random.choice(string.ascii_uppercase) for x in range(length/4))
|
||||
secret_key = secret_key + ''.join(random.choice("~!@#$%^&*()_+") for x in range(length/4))
|
||||
secret_key = secret_key + ''.join(random.choice(string.ascii_lowercase) for x in range(length/4))
|
||||
return secret_key + ''.join(random.choice(string.digits) for x in range(length/4))
|
||||
secret_key = ''.join(random.choice(string.ascii_uppercase) for x in range(round(length/4)))
|
||||
secret_key = secret_key + ''.join(random.choice("~!@#$%^&*()_+") for x in range(round(length/4)))
|
||||
secret_key = secret_key + ''.join(random.choice(string.ascii_lowercase) for x in range(round(length/4)))
|
||||
return secret_key + ''.join(random.choice(string.digits) for x in range(round(length/4)))
|
||||
|
||||
|
||||
THREADS_PER_PAGE = 8
|
||||
|
Reference in New Issue
Block a user