Esempio n. 1
0
def ValidateCompare2(command):
    """Validate the arguments to compare2. Raises ParseError if failed."""
    executables = [".exe", ".com", ".bat"]
    if (os.path.splitext(command["--browser1"])[1].lower() not in executables
            or os.path.splitext(
                command["--browser2"])[1].lower() not in executables):
        raise command_line.ParseError("Browser filename must be an executable")
Esempio n. 2
0
def ValidateMaskmaker(command):
    """Validate the arguments to maskmaker. Raises ParseError if failed."""
    executables = [".exe", ".com", ".bat"]
    if command["--browserpath"]:
        if os.path.splitext(
                command["--browserpath"])[1].lower() not in executables:
            raise command_line.ParseError(
                "Browser filename must be an executable")