diff --git a/common.py b/common.py index 6f7e288..73f9697 100644 --- a/common.py +++ b/common.py @@ -15,18 +15,6 @@ def __init__(self, product, profile): self.product = product self.profile = profile - def validate_input(self, query, hostname, username, days, minutes): - if hostname and 'hostname' in query: - click.echo('Cannot use --hostname with "hostname:" (in query)') - return False - elif username and 'username' in query: - click.echo('Cannot use --username with "username:" (in query)') - return False - elif days and minutes: - click.echo(f"Since both minutes and days are provided, the query will return all results from the previous {minutes} minutes") - return True - else: - return True # Build the query based on the product that was chosen def base_query(self, *args): diff --git a/surveyor.py b/surveyor.py index d0abfb3..d4dac00 100644 --- a/surveyor.py +++ b/surveyor.py @@ -90,11 +90,8 @@ def cli(ctx, prefix, hostname, profile, days, minutes, product, username, iocfil #if --query run the query and write results to the csv if query: click.echo(f"Running Query: {query}") - if utils.validate_input(query, hostname, username): - results = utils.process_search(conn, query, base_query) - utils.write_csv(writer, results, query, "query") - else: - ctx.fail("Query and filters were incompatible. See above error.") + results = utils.process_search(conn, query, base_query) + utils.write_csv(writer, results, query, "query") # if --deffile add file to list elif deffile: