code: def read(path):
      
      # Try to read the pid from the pidfile.
      logging.info("Checking pidfile '%s'", path)
      try:
          return int(open(path).read())
      except IOError as xxx_todo_changeme:
          (code, text) = xxx_todo_changeme.args
          if code == errno.ENOENT:  # no such file or directory
              return None
          raise
docs: Returns the process id from the given file if it exists, or None
      otherwise. Raises an exception for all other types of OSError
      while trying to access the file.
  
      :type  path: str
      :param path: The name of the pidfile.
      :rtype:  int or None
      :return: The PID, or none if the file was not found.