You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sdap.apache.org by ea...@apache.org on 2020/10/30 20:12:04 UTC

[incubator-sdap-nexus] branch delete-script-support-cassandra-auth updated: Cleanup

This is an automated email from the ASF dual-hosted git repository.

eamonford pushed a commit to branch delete-script-support-cassandra-auth
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexus.git


The following commit(s) were added to refs/heads/delete-script-support-cassandra-auth by this push:
     new c9f38ec  Cleanup
c9f38ec is described below

commit c9f38ec0987e5a97f3b91403bc3198b84a4efdd7
Author: Eamon Ford <ea...@gmail.com>
AuthorDate: Fri Oct 30 13:10:54 2020 -0700

    Cleanup
---
 tools/deletebyquery/deletebyquery.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/tools/deletebyquery/deletebyquery.py b/tools/deletebyquery/deletebyquery.py
index 6d5233c..6e24367 100644
--- a/tools/deletebyquery/deletebyquery.py
+++ b/tools/deletebyquery/deletebyquery.py
@@ -23,7 +23,7 @@ from random import sample
 from cassandra.auth import PlainTextAuthProvider
 import cassandra.concurrent
 from cassandra.cluster import Cluster
-from cassandra.policies import RoundRobinPolicy, TokenAwarePolicy, WhiteListRoundRobinPolicy
+from cassandra.policies import RoundRobinPolicy, TokenAwarePolicy
 from solrcloudpy import SolrConnection, SearchOptions
 
 from six.moves import input
@@ -135,8 +135,7 @@ def check_query(query):
         return False
     else:
         se = SearchOptions()
-        se.commonparams.q('%s:%s' % (SOLR_UNIQUE_KEY, sample(
-            solr_response.result.response.docs, 1)[0][SOLR_UNIQUE_KEY]))
+        se.commonparams.q('%s:%s' % (SOLR_UNIQUE_KEY, sample(solr_response.result.response.docs, 1)[0][SOLR_UNIQUE_KEY]))
         logging.info(json.dumps(solr_collection.search(se).result.response.docs[0], indent=2))
         return check_query(query)