def get_current_theme():
 if (not is_comprehensive_theming_enabled()):
  return None
 site_theme = get_current_site_theme()
 if (not site_theme):
  return None
 try:
  return Theme(name=site_theme.theme_dir_name, theme_dir_name=site_theme.theme_dir_name, themes_base_dir=get_theme_base_dir(site_theme.theme_dir_name))
 except ValueError as error:
  logger.exception('Theme not found in any of the themes dirs. [%s]', error)
  return None

def get_current_theme ( ) : if ( not is_comprehensive_theming_enabled ( ) ) : return None site_theme = get_current_site_theme ( ) if ( not site_theme ) : return None try : return Theme ( name = site_theme . theme_dir_name , theme_dir_name = site_theme . theme_dir_name , themes_base_dir = get_theme_base_dir ( site_theme . theme_dir_name ) ) except ValueError as error : logger . exception ( 'Theme not found in any of the themes dirs. [%s]' , error ) return None
get the currently active theme object .