def normalize_version(ver, length=4):
    """Takes version as a list and how long it should be.
      Appends 0's if it's not long enough."""
    if len(ver) > length:
        raise Exception('Version is longer than the longest length')
    return ver + [0] * (length - len(ver))
