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")
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")