def get_context(self, name):
        """Get context from kubeconfig."""
        contexts = self.data['contexts']
        for context in contexts:
            if context['name'] == name:
                return context
        raise KubeConfError("context name not found.")
def get_context ( self , name ) : contexts = self . data [ 'contexts' ] for context in contexts : if context [ 'name' ] == name : return context raise KubeConfError ( "context name not found." )
Get context from kubeconfig.