Since Python's ConfigParser does not throw an exception if the file does not exist, is it fine to do it this way:try:    config = ConfigParser.RawConfigParser()    if config.read('/home/me/file.conf') != []:        pass    else:        raise IOError('Cannot open configuration file')except IOError, error:    sys.exit(error)
ConfigParser inexisting file exception
python
you should try to put as little as possible inside the try blockThere isn't a whole lot of point to throwing an exception just to catch it on the next line.