diff create_account.py @ 5:f7e9c792047b draft

planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit 85194fa009ead2c34720faab61a4143fc29d17c2
author gga
date Fri, 31 Aug 2018 09:34:42 -0400
parents 40b26f8269a3
children df0e4eb2dfa5
line wrap: on
line diff
--- a/create_account.py	Mon Mar 12 06:33:27 2018 -0400
+++ b/create_account.py	Fri Aug 31 09:34:42 2018 -0400
@@ -2,17 +2,11 @@
 from __future__ import print_function
 
 import argparse
-import random
 import time
 
 from six.moves.builtins import str
 
-from webapollo import WAAuth, WebApolloInstance
-
-
-def pwgen(length):
-    chars = list('qwrtpsdfghjklzxcvbnm')
-    return ''.join(random.choice(chars) for _ in range(length))
+from webapollo import PasswordGenerator, WAAuth, WebApolloInstance
 
 
 if __name__ == '__main__':
@@ -26,7 +20,7 @@
 
     wa = WebApolloInstance(args.apollo, args.username, args.password)
 
-    password = pwgen(12)
+    password = PasswordGenerator(12)
     time.sleep(1)
     users = wa.users.loadUsers()
     user = [u for u in users