示例#1
0
def compare_apps(request, hash1: str, hash2: str):
    if hash1 == hash2:
        error_msg = 'Results with same hash cannot be compared'
        return print_n_send_error_response(request, error_msg, False)
    logger.info(
        'Starting App compare for %s and %s', hash1, hash2)
    return generic_compare(request, hash1, hash2)
def compare_apps(request, first_hash: str, second_hash: str):
    if first_hash == second_hash:
        error_msg = "Results with same hash cannot be compared"
        return print_n_send_error_response(request, error_msg, False)
    logger.info("Starting App compare for - {} and {}".format(
        first_hash, second_hash))
    return generic_compare(request, first_hash, second_hash)
def compare_apps(request, first_hash: str, second_hash: str):
    if first_hash == second_hash:
        error_msg = "Results with same hash cannot be compared"
        return print_n_send_error_response(request, error_msg, False)
    logger.info(
        "Starting App compare for - {} and {}".format(first_hash, second_hash))
    return generic_compare(request, first_hash, second_hash)
示例#4
0
def compare_apps(request, hash1: str, hash2: str, api=False):
    if hash1 == hash2:
        error_msg = 'Results with same hash cannot be compared'
        return print_n_send_error_response(request, error_msg, api)
    # Second Validation for REST API
    if not (is_md5(hash1) and is_md5(hash2)):
        error_msg = 'Invalid hashes'
        return print_n_send_error_response(request, error_msg, api)
    logger.info('Starting App compare for %s and %s', hash1, hash2)
    return generic_compare(request, hash1, hash2, api)