some more robustness tweaks

This commit is contained in:
2022-11-28 11:21:12 +01:00
parent bd3350c28a
commit 2338d951c7
5 changed files with 55 additions and 28 deletions

View File

@ -17,7 +17,9 @@ def main():
def prompt_ssh_key_removal():
do_remove_key = input("Do you want to remove problematic keys on localhost ([Y]/n)?: ")
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", ""]:
sys.exit(1)
port = 0
@ -65,7 +67,7 @@ def handle_args():
"--flatsat",
default=False,
action="store_true",
help="Copy to flatsat instead"
help="Copy to flatsat instead",
)
# Positional argument(s)
parser.add_argument(
@ -86,7 +88,7 @@ def build_cmd(args):
address = "eive@flatsat.eive.absatvirt.lw"
else:
address = "root@localhost"
port_args=f"-P {args.port}"
port_args = f"-P {args.port}"
if args.invert:
if target == "":
target = "."