old_contents: import os
  import sys
  import yaml
  
  
  db_host = "localhost"
  db_port = 3306
  db_user = "csv2"
  db_password = ""
  
  
  
  if os.path.isfile("/etc/cloudscheduler.yaml"):
      path = "/etc/cloudscheduler.yaml"
  
  elif os.path.isfile("/opt/cloudscheduler/cloudscheduler.yaml"):
      path = "/opt/cloudscheduler/cloudscheduler.yaml"
  
  
  try:
      with open(path, 'r') as ymlfile:
          cfg = yaml.load(ymlfile)
  
  except Exception as e:
      print("Configuration file problem: There was a " \
            "problem reading %s. Check that it is readable," \
            "and that it exists. " % path, file=sys.stderr)
  
  
  
  if "database" in cfg:
      if "db_host" in cfg["database"]:
          db_host = cfg["database"]["db_host"]
  
      if "db_port" in cfg["database"]:
          db_port = cfg["database"]["db_port"]
  
      if "db_name" in cfg["database"]:
          db_name = cfg["database"]["db_name"]
  
      if "db_user" in cfg["database"]:
          db_user = cfg["database"]["db_user"]
  
      if "db_password" in cfg["database"]:
          db_password = cfg["database"]["db_password"]
  
new_contents: import os
  import sys
  import yaml
  
  
  db_host = "localhost"
  db_port = 3306
  db_user = "csv2"
  db_password = ""
  
  
  
  if os.path.isfile("/etc/cloudscheduler/cloudscheduler.yaml"):
      path = "/etc/cloudscheduler/cloudscheduler.yaml"
  
  elif os.path.isfile("/opt/cloudscheduler/cloudscheduler.yaml"):
      path = "/opt/cloudscheduler/cloudscheduler.yaml"
  
  
  try:
      with open(path, 'r') as ymlfile:
          cfg = yaml.load(ymlfile)
  
  except Exception as e:
      print("Configuration file problem: There was a " \
            "problem reading %s. Check that it is readable," \
            "and that it exists. " % path, file=sys.stderr)
  
  
  
  if "database" in cfg:
      if "db_host" in cfg["database"]:
          db_host = cfg["database"]["db_host"]
  
      if "db_port" in cfg["database"]:
          db_port = cfg["database"]["db_port"]
  
      if "db_name" in cfg["database"]:
          db_name = cfg["database"]["db_name"]
  
      if "db_user" in cfg["database"]:
          db_user = cfg["database"]["db_user"]
  
      if "db_password" in cfg["database"]:
          db_password = cfg["database"]["db_password"]
  
subject: fix path for csv2 generic yaml file