#NEWLINE# def _id_resolv( self , iid , named = True , uid = True ) : #NEWLINE# #INDENT# '\n        Resolve local users and groups.\n\n        :param iid:\n        :param named:\n        :param uid:\n        :return:\n        ' #NEWLINE# if ( not self . local_identity ) : #NEWLINE# #INDENT# self . local_identity [ 'users' ] = self . _get_local_users ( ) #NEWLINE# self . local_identity [ 'groups' ] = self . _get_local_groups ( ) #NEWLINE# #UNINDENT# if ( not named ) : #NEWLINE# #INDENT# return iid #NEWLINE# #UNINDENT# for ( name , meta ) in self . local_identity [ ( ( uid and 'users' ) or 'groups' ) ] . items ( ) : #NEWLINE# #INDENT# if ( ( meta and ( int ( meta . get ( 'uid' , ( - 1 ) ) ) == iid ) ) or ( ( not uid ) and ( int ( meta . get ( 'gid' , ( - 1 ) ) ) == iid ) ) ) : #NEWLINE# #INDENT# return name #NEWLINE# #UNINDENT# #UNINDENT# return iid