summaryrefslogtreecommitdiff
path: root/tools/generate_support_bundle.py
diff options
context:
space:
mode:
authorJafar Al-Gharaibeh <jafar@atcorp.com>2022-01-07 13:13:14 -0600
committerGitHub <noreply@github.com>2022-01-07 13:13:14 -0600
commitc514ba5e661b8d99a0e3154adec1c02ab6628840 (patch)
treee2b8be4f8359aca0094a17f407371c484b3cf422 /tools/generate_support_bundle.py
parent9f9efe7efafd20929146149b978c1216aeca19fa (diff)
parent667cfdc824af732d941d470a0c8c57a1614fe101 (diff)
Merge pull request #10300 from donaldsharp/support_bundle_fix
tools: Run formatter over generate_support_bundle.py
Diffstat (limited to 'tools/generate_support_bundle.py')
-rwxr-xr-xtools/generate_support_bundle.py16
1 files changed, 13 insertions, 3 deletions
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()