def __getattr__(self, mod_name):
        '''
        Allow for "direct" attribute access-- this allows jinja templates to
        access things like `salt.test.ping()`
        '''
        if mod_name in ('__getstate__', '__setstate__'):
            return object.__getattribute__(self, mod_name)

        # if we have an attribute named that, lets return it.
        try:
            return object.__getattr__(self, mod_name)  # pylint: disable=no-member
        except AttributeError:
            pass

        # otherwise we assume its jinja template access
        if mod_name not in self.loaded_modules and not self.loaded:
            for name in self._iter_files(mod_name):
                if name in self.loaded_files:
                    continue
                # if we got what we wanted, we are done
                if self._load_module(name) and mod_name in self.loaded_modules:
                    break
        if mod_name in self.loaded_modules:
            return self.loaded_modules[mod_name]
        else:
            raise AttributeError(mod_name)
def __getattr__ ( self , mod_name ) : if mod_name in ( '__getstate__' , '__setstate__' ) : return object . __getattribute__ ( self , mod_name ) try : return object . __getattr__ ( self , mod_name ) except AttributeError : pass if mod_name not in self . loaded_modules and not self . loaded : for name in self . _iter_files ( mod_name ) : if name in self . loaded_files : continue if self . _load_module ( name ) and mod_name in self . loaded_modules : break if mod_name in self . loaded_modules : return self . loaded_modules [ mod_name ] else : raise AttributeError ( mod_name )
Allow for "direct" attribute access-- this allows jinja templates to
        access things like `salt.test.ping()`