Commit 3bcb2865 authored by Chris Hines's avatar Chris Hines
Browse files

use random.choice for compat with python3.5

parent 57ab0a24
......@@ -36,7 +36,9 @@ class ShareStoreAPI(Resource):
value = json.dumps(postdata)
logger.debug("post value {}".format(value))
while not acceptedkey:
key = ''.join(random.choices(string.ascii_uppercase + string.digits, k=16))
key = ''
for i in range(0,16):
key=key+random.choice(string.ascii_uppercase + string.digits)
newsd = ShareData(key=key,value=value)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment