def get_module_masses(massfile):
    """Parse input file to get masses of each module.

    Input file has the mass of each module on its own line.

    Return list of module masses.
    """

    module_masses = []
    with open(massfile, "r") as infile:
        module_masses = [int(line) for line in infile]

    return module_masses