fix: [tool] minor cosmetic fix

pull/844/head
Christophe Vandeplas 2023-04-23 15:00:57 +02:00
parent 7d98ac013c
commit 568e6a7507
No known key found for this signature in database
GPG Key ID: BDC48619FFDC5A5B
1 changed files with 2 additions and 3 deletions

View File

@ -68,7 +68,7 @@ class AtLeastTwoItemsAction(argparse.Action):
setattr(namespace, self.dest, filenames) setattr(namespace, self.dest, filenames)
parser = argparse.ArgumentParser(description="MISP Galaxy relationship tool.") parser = argparse.ArgumentParser(description="MISP Galaxy relationship creation tool.")
parser.add_argument("files", nargs='+', parser.add_argument("files", nargs='+',
help="The names of the clusters. (filename or cluster-name)", help="The names of the clusters. (filename or cluster-name)",
action=AtLeastTwoItemsAction) action=AtLeastTwoItemsAction)
@ -80,7 +80,7 @@ parser.add_argument("-sd", "--synonyms-destination",
action='store_true') action='store_true')
parser.add_argument("-y", "--yes", parser.add_argument("-y", "--yes",
help="Assume yes to all the questions, so create relationships without asking.", help="Assume yes to all the questions, so create relationships without asking.",
action='store_true') # FIXME develop this feature action='store_true')
parser.add_argument('-v', '--verbose', action='count', default=0) parser.add_argument('-v', '--verbose', action='count', default=0)
args = parser.parse_args() args = parser.parse_args()
@ -144,7 +144,6 @@ try:
create_relationship = True create_relationship = True
else: else:
# interactive prompt to ask what to do # interactive prompt to ask what to do
# TODO add question which tags and relationship type and more
print(f"Found non-existing match for {cluster_filename} {values_to_lookup} in {lookup_cluster_filename} {lookup_cluster_values}.") print(f"Found non-existing match for {cluster_filename} {values_to_lookup} in {lookup_cluster_filename} {lookup_cluster_values}.")
while True: while True:
user_input = input(f"Create relation? [\u0332yes] / \u0332no / \u0332details / \u0332tags / \u0332relation: ").lower().strip() user_input = input(f"Create relation? [\u0332yes] / \u0332no / \u0332details / \u0332tags / \u0332relation: ").lower().strip()