You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sdap.apache.org by nc...@apache.org on 2021/05/19 19:13:30 UTC

[incubator-sdap-nexus] branch master updated: SDAP-308 Fixed deletebyquery.py to be compatible with Python 3 (#128)

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

nchung pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexus.git


The following commit(s) were added to refs/heads/master by this push:
     new 362c4cb  SDAP-308 Fixed deletebyquery.py to be compatible with Python 3 (#128)
362c4cb is described below

commit 362c4cbaec0f19011bcb53fffcd42129f9149d83
Author: Nga Chung <17...@users.noreply.github.com>
AuthorDate: Wed May 19 12:13:24 2021 -0700

    SDAP-308 Fixed deletebyquery.py to be compatible with Python 3 (#128)
---
 tools/deletebyquery/deletebyquery.py | 12 ++++++------
 tools/deletebyquery/requirements.txt |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/tools/deletebyquery/deletebyquery.py b/tools/deletebyquery/deletebyquery.py
index c6957a1..8ed70dd 100644
--- a/tools/deletebyquery/deletebyquery.py
+++ b/tools/deletebyquery/deletebyquery.py
@@ -105,12 +105,12 @@ def delete_by_query(args):
 
 
 def confirm_delete(num_found):
-    do_continue = eval(input(
-        "This action will delete %s record(s) from SOLR and Cassandra. Are you sure you want to Continue? y/n: " % num_found))
+    do_continue = input(
+        "This action will delete %s record(s) from SOLR and Cassandra. Are you sure you want to Continue? y/n: " % num_found)
 
     while do_continue not in ['y', 'n']:
-        do_continue = eval(input(
-            "This action will delete %s record(s) from SOLR and Cassandra. Are you sure you want to Continue? y/n: " % num_found))
+        do_continue = input(
+            "This action will delete %s record(s) from SOLR and Cassandra. Are you sure you want to Continue? y/n: " % num_found)
 
     return do_continue == 'y'
 
@@ -124,10 +124,10 @@ def check_query(query):
         logging.info("Query returned 0 results")
         return False
 
-    do_continue = eval(input("Query found %s matching documents. Continue? [y]/n/(s)ample: " % num_found))
+    do_continue = input("Query found %s matching documents. Continue? [y]/n/(s)ample: " % num_found)
 
     while do_continue not in ['y', 'n', 's', '']:
-        do_continue = eval(input("Query found %s matching documents. Continue? [y]/n/(s)ample: " % num_found))
+        do_continue = input("Query found %s matching documents. Continue? [y]/n/(s)ample: " % num_found)
 
     if do_continue == 'y' or do_continue == '':
         return True
diff --git a/tools/deletebyquery/requirements.txt b/tools/deletebyquery/requirements.txt
index df8a421..1852f70 100644
--- a/tools/deletebyquery/requirements.txt
+++ b/tools/deletebyquery/requirements.txt
@@ -1 +1 @@
-solrcloudpy==2.4.1
+solrcloudpy==4.0.1