Skip to content
This repository has been archived by the owner on Dec 25, 2019. It is now read-only.

Commit

Permalink
Update generate_keys.py
Browse files Browse the repository at this point in the history
Convert length to int to prevent TypeError: range() integer end argument expected, got str.
  • Loading branch information
mkurtay committed Feb 24, 2016
1 parent 7f45466 commit a4a5f91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/application/generate_keys.py
Expand Up @@ -49,7 +49,7 @@
def generate_randomkey(length):
"""Generate random key, given a number of characters"""
chars = string.letters + string.digits
return ''.join([choice(chars) for i in range(length)])
return ''.join([choice(chars) for i in range(int(length))])


def write_file(contents):
Expand Down

0 comments on commit a4a5f91

Please sign in to comment.