def _strip_key(dictionary, keyword):
 for (key, value) in six.iteritems(dictionary):
  if (key == keyword):
   dictionary[key] = None
  elif isinstance(value, dict):
   _strip_key(value, keyword)
  elif isinstance(value, list):
   for item in value:
    if isinstance(item, dict):
     _strip_key(item, keyword)
 return dictionary

def _strip_key ( dictionary , keyword ) : for ( key , value ) in six . iteritems ( dictionary ) : if ( key == keyword ) : dictionary [ key ] = None elif isinstance ( value , dict ) : _strip_key ( value , keyword ) elif isinstance ( value , list ) : for item in value : if isinstance ( item , dict ) : _strip_key ( item , keyword ) return dictionary
strips an ssh key string of white space and line endings and returns the new string .