1111import sys
1212import getpass
1313import glob
14+ import re
1415
1516
1617def setupdomain (self , data ):
@@ -76,7 +77,7 @@ def setupdatabase(self, data):
7677
7778 if prompt_dbname == 'True' or prompt_dbname == 'true' :
7879 try :
79- ee_db_name = input ('Enter the MySQL database name [{0}]:'
80+ ee_db_name = input ('Enter the MySQL database name [{0}]: '
8081 .format (ee_replace_dot ))
8182 except EOFError as e :
8283 Log .debug (self , "{0}" .format (e ))
@@ -102,8 +103,8 @@ def setupdatabase(self, data):
102103 ee_db_password = ee_random
103104
104105 if len (ee_db_username ) > 16 :
105- Log .info (self , 'Autofix MySQL username (ERROR 1470 (HY000)),'
106- ' please wait' )
106+ Log .debug (self , 'Autofix MySQL username (ERROR 1470 (HY000)),'
107+ ' please wait' )
107108 ee_random10 = ('' .join (random .sample (string .ascii_uppercase +
108109 string .ascii_lowercase + string .digits , 10 )))
109110 ee_db_username = (ee_db_name [0 :6 ] + ee_random10 )
@@ -145,8 +146,8 @@ def setupwordpress(self, data):
145146 ee_random = ('' .join (random .sample (string .ascii_uppercase +
146147 string .ascii_lowercase + string .digits , 15 )))
147148 ee_wp_prefix = ''
148- ee_wp_user = ''
149- ee_wp_pass = ''
149+ # ee_wp_user = ''
150+ # ee_wp_pass = ''
150151
151152 Log .info (self , "Downloading Wordpress \t \t " , end = '' )
152153 EEFileUtils .chdir (self , '{0}/htdocs/' .format (ee_site_webroot ))
@@ -157,9 +158,8 @@ def setupwordpress(self, data):
157158 data = setupdatabase (self , data )
158159 if prompt_wpprefix == 'True' or prompt_wpprefix == 'true' :
159160 try :
160- ee_wp_prefix = input ('Enter the WordPress table prefix [wp_]: '
161- .format (ee_replace_dot ))
162- while re .match ('^[A-Za-z0-9_]*$' , ee_wp_prefix ):
161+ ee_wp_prefix = input ('Enter the WordPress table prefix [wp_]: ' )
162+ while not re .match ('^[A-Za-z0-9_]*$' , ee_wp_prefix ):
163163 Log .warn (self , "table prefix can only "
164164 "contain numbers, letters, and underscores" )
165165 ee_wp_prefix = input ('Enter the WordPress table prefix [wp_]: '
0 commit comments