From 39f0db1db6f1ae8fd4ee2c27dffa4b05489f35fd Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 30 Apr 2024 13:50:22 +0200 Subject: [PATCH] small fixes for q7s-cp script --- scripts/q7s-cp.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/q7s-cp.py b/scripts/q7s-cp.py index 7a4f7405..76ef2353 100755 --- a/scripts/q7s-cp.py +++ b/scripts/q7s-cp.py @@ -4,6 +4,9 @@ import os import sys +DEFAULT_PORT = 1539 + + def main(): args = handle_args() cmd = build_cmd(args) @@ -20,7 +23,7 @@ def prompt_ssh_key_removal(): do_remove_key = input( "Do you want to remove problematic keys on localhost ([Y]/n)?: " ) - if not do_remove_key.lower() in ["y", "yes", "1", ""]: + if do_remove_key.lower() not in ["y", "yes", "1", ""]: sys.exit(1) port = 0 while True: @@ -54,7 +57,7 @@ def handle_args(): "If files are copied back to host, will be current directory by default", default="", ) - parser.add_argument("-P", "--port", help="Target port", default=1535) + parser.add_argument("-P", "--port", help="Target port", default=DEFAULT_PORT) parser.add_argument( "-i", "--invert",