diff options
| -rw-r--r-- | tests/topotests/nhrp_topo/test_nhrp_topo.py | 8 | ||||
| -rwxr-xr-x | tools/generate_support_bundle.py | 16 |
2 files changed, 17 insertions, 7 deletions
diff --git a/tests/topotests/nhrp_topo/test_nhrp_topo.py b/tests/topotests/nhrp_topo/test_nhrp_topo.py index 313ffd5ce9..e6e551906a 100644 --- a/tests/topotests/nhrp_topo/test_nhrp_topo.py +++ b/tests/topotests/nhrp_topo/test_nhrp_topo.py @@ -87,14 +87,14 @@ def _populate_iface(): for cmd in cmds_tot_hub: input = cmd.format("r2", "2") - logger.info("input: " + cmd) - output = tgen.net["r2"].cmd(cmd.format("r2", "2")) + logger.info("input: " + input) + output = tgen.net["r2"].cmd(input) logger.info("output: " + output) for cmd in cmds_tot: input = cmd.format("r1", "1") - logger.info("input: " + cmd) - output = tgen.net["r1"].cmd(cmd.format("r1", "1")) + logger.info("input: " + input) + output = tgen.net["r1"].cmd(input) logger.info("output: " + output) diff --git a/tools/generate_support_bundle.py b/tools/generate_support_bundle.py index c6b876f5b8..104d9714d4 100755 --- a/tools/generate_support_bundle.py +++ b/tools/generate_support_bundle.py @@ -26,19 +26,28 @@ import os import subprocess import tempfile + def open_with_backup(path): if os.path.exists(path): print("Making backup of " + path) subprocess.check_call("mv {0} {0}.prev".format(path), shell=True) return open(path, "w") + def main(): parser = argparse.ArgumentParser() - parser.add_argument("-c", "--config", default="/etc/frr/support_bundle_commands.conf", help="input config") - parser.add_argument("-l", "--log-dir", default="/var/log/frr", help="directory for logfiles") + parser.add_argument( + "-c", + "--config", + default="/etc/frr/support_bundle_commands.conf", + help="input config", + ) + parser.add_argument( + "-l", "--log-dir", default="/var/log/frr", help="directory for logfiles" + ) args = parser.parse_args() - collecting = False # file format has sentinels (seem superfluous) + collecting = False # file format has sentinels (seem superfluous) proc_cmds = {} proc = None temp = None @@ -85,5 +94,6 @@ def main(): for p in procs: p.wait() + if __name__ == "__main__": main() |
