@frappe.whitelist()
def setup_complete(args):
 if cint(frappe.db.get_single_value(u'System Settings', u'setup_complete')):
  return
 args = process_args(args)
 try:
  if (args.language and (args.language != u'english')):
   set_default_language(get_language_code(args.lang))
  frappe.clear_cache()
  update_system_settings(args)
  update_user_name(args)
  for method in frappe.get_hooks(u'setup_wizard_complete'):
   frappe.get_attr(method)(args)
  disable_future_access()
  frappe.db.commit()
  frappe.clear_cache()
 except:
  frappe.db.rollback()
  if args:
   traceback = frappe.get_traceback()
   for hook in frappe.get_hooks(u'setup_wizard_exception'):
    frappe.get_attr(hook)(traceback, args)
  raise
 else:
  for hook in frappe.get_hooks(u'setup_wizard_success'):
   frappe.get_attr(hook)(args)

@ frappe . whitelist ( ) def setup_complete ( args ) : if cint ( frappe . db . get_single_value ( u'System Settings' , u'setup_complete' ) ) : return args = process_args ( args ) try : if ( args . language and ( args . language != u'english' ) ) : set_default_language ( get_language_code ( args . lang ) ) frappe . clear_cache ( ) update_system_settings ( args ) update_user_name ( args ) for method in frappe . get_hooks ( u'setup_wizard_complete' ) : frappe . get_attr ( method ) ( args ) disable_future_access ( ) frappe . db . commit ( ) frappe . clear_cache ( ) except : frappe . db . rollback ( ) if args : traceback = frappe . get_traceback ( ) for hook in frappe . get_hooks ( u'setup_wizard_exception' ) : frappe . get_attr ( hook ) ( traceback , args ) raise else : for hook in frappe . get_hooks ( u'setup_wizard_success' ) : frappe . get_attr ( hook ) ( args )
calls hooks for setup_wizard_complete .