@click.command(u'reinstall')
@click.option(u'--admin-password', help=u'Administrator Password for reinstalled site')
@click.option(u'--yes', is_flag=True, default=False, help=u'Pass --yes to skip confirmation')
@pass_context
def reinstall(context, admin_password=None, yes=False):
 if (not yes):
  click.confirm(u'This will wipe your database. Are you sure you want to reinstall?', abort=True)
 site = get_site(context)
 try:
  frappe.init(site=site)
  frappe.connect()
  frappe.clear_cache()
  installed = frappe.get_installed_apps()
  frappe.clear_cache()
 except Exception:
  installed = []
 finally:
  if frappe.db:
   frappe.db.close()
  frappe.destroy()
 frappe.init(site=site)
 _new_site(frappe.conf.db_name, site, verbose=context.verbose, force=True, reinstall=True, install_apps=installed, admin_password=admin_password)

@ click . command ( u'reinstall' ) @ click . option ( u'--admin-password' , help = u'Administrator Password for reinstalled site' ) @ click . option ( u'--yes' , is_flag = True , default = False , help = u'Pass --yes to skip confirmation' ) @ pass_context def reinstall ( context , admin_password = None , yes = False ) : if ( not yes ) : click . confirm ( u'This will wipe your database. Are you sure you want to reinstall?' , abort = True ) site = get_site ( context ) try : frappe . init ( site = site ) frappe . connect ( ) frappe . clear_cache ( ) installed = frappe . get_installed_apps ( ) frappe . clear_cache ( ) except Exception : installed = [ ] finally : if frappe . db : frappe . db . close ( ) frappe . destroy ( ) frappe . init ( site = site ) _new_site ( frappe . conf . db_name , site , verbose = context . verbose , force = True , reinstall = True , install_apps = installed , admin_password = admin_password )
reinstall site ie .