#NEWLINE# def load_rules( self , force_reload = False ) : #NEWLINE# #INDENT# "Loads policy_path's rules.\n\n        Policy file is cached and will be reloaded if modified.\n\n        :param force_reload: Whether to overwrite current rules.\n        " #NEWLINE# if force_reload : #NEWLINE# #INDENT# self . use_conf = force_reload #NEWLINE# #UNINDENT# if self . use_conf : #NEWLINE# #INDENT# if ( not self . policy_path ) : #NEWLINE# #INDENT# self . policy_path = self . _get_policy_path ( self . policy_file ) #NEWLINE# #UNINDENT# self . _load_policy_file ( self . policy_path , force_reload ) #NEWLINE# for path in CONF . policy_dirs : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# path = self . _get_policy_path ( force_reload ) #NEWLINE# #UNINDENT# except cfg . ConfigFilesNotFoundError : #NEWLINE# #INDENT# LOG . warn ( _LW ( 'Can not find policy directories %s' ) , path ) #NEWLINE# continue #NEWLINE# #UNINDENT# self . _walk_through_policy_directory ( path , self . _load_policy_file , force_reload , False )