docs: def from_file(cls, path=None):
          """
          Read YAML config file. Returns Config object.
  
          :raises IOError: if the path does not exist
          """
          # None => use default
          if path is None:
              for path in cls.default_pathes():
                  try:
                      return cls.from_file(path)
                  except IOError as e:
                      logging.getLogger(__name__).debug(
                          _("Failed to read config file: {0}", exc_message(e)))
                  except ImportError as e:
                      logging.getLogger(__name__).warn(
                          _("Failed to read {0!r}: {1}", path, exc_message(e)))
              return cls({})
          # False/'' => no config
          if not path:
              return cls({})
          if os.path.splitext(path)[1].lower() == '.json':
              from json import load
          else:
              from yaml import safe_load as load
          with open(path) as f:
              return cls(load(f))