From: alex Date: Sat, 26 Oct 2024 16:34:22 +0000 (+0200) Subject: Fix multiple route support X-Git-Url: https://xn--ix-yja.es/gitweb/?a=commitdiff_plain;h=f552ef3dcadcced2155c857d1e9aa3d5712e3f51;p=alex.git Fix multiple route support --- diff --git a/linux/reroute.py b/linux/reroute.py index db1a16a..2e00647 100755 --- a/linux/reroute.py +++ b/linux/reroute.py @@ -26,11 +26,11 @@ def main(): parser.add_argument("ip") parser.add_argument("command", nargs="+") - parser.add_argument("--route", nargs="*", help="destination,gateway") + parser.add_argument("--route", action="append", help="destination,gateway") args = parser.parse_args() - routes = "".join([_make_route(r) for r in args.route]) + routes = "\n".join([_make_route(r) for r in args.route]) command = shlex.join(args.command)