hadoop-ozone/dist/src/main/dockerlibexec/transformation.py
def process_properties(content, sep=': ', comment_char='#'):
  """
  Read the file passed as parameter as a properties file.
  """
  props = {}
  for line in content.split("\n"):
    sline = line.strip()
    if sline and not sline.startswith(comment_char):
      key_value = sline.split(sep)
      key = key_value[0].strip()
      value = sep.join(key_value[1:]).strip().strip('"')
      props[key] = value

  return props

  Read the file passed as parameter as a properties file.
  
Read the file passed as parameter as a properties file.
Read the file passed as parameter as a properties file .
def process_properties(content, sep=': ', comment_char='#'):
  props = {}
  for line in content.split("\n"):
    sline = line.strip()
    if sline and not sline.startswith(comment_char):
      key_value = sline.split(sep)
      key = key_value[0].strip()
      value = sep.join(key_value[1:]).strip().strip('"')
      props[key] = value
  return props
def process_properties ( content , sep = ': ' , comment_char = '#' ) : props = { } for line in content . split ( "\n" ) : sline = line . strip ( ) if sline and not sline . startswith ( comment_char ) : key_value = sline . split ( sep ) key = key_value [ 0 ] . strip ( ) value = sep . join ( key_value [ 1 : ] ) . strip ( ) . strip ( '"' ) props [ key ] = value return props
Read the file passed as parameter as a properties file.
Read the file passed as parameter as a properties file .
"""
  Read the file passed as parameter as a properties file.
  """
content
sep
comment_char