diff options
author | Don Slice <dslice@nvidia.com> | 2021-03-19 20:03:51 +0100 |
---|---|---|
committer | Don Slice <dslice@nvidia.com> | 2021-03-31 18:38:59 +0200 |
commit | 880dcb06e4166c3c861bd0e04361af12d85ef056 (patch) | |
tree | 4ff805c3eff26b9f533a13b34137fe2be92b2963 /tools | |
parent | Merge pull request #8350 from opensourcerouting/printfrr-revamp (diff) | |
download | frr-880dcb06e4166c3c861bd0e04361af12d85ef056.tar.xz frr-880dcb06e4166c3c861bd0e04361af12d85ef056.zip |
tools: frr-reload.py changes to make black happy
Since black is finding issues before applying my change, committing
those changes separately
Signed-off-by: Don Slice <dslice@nvidia.com>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/frr-reload.py | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/tools/frr-reload.py b/tools/frr-reload.py index 1461e0f29..75d6b62d4 100755 --- a/tools/frr-reload.py +++ b/tools/frr-reload.py @@ -108,7 +108,7 @@ class Vtysh(object): stdout, stderr = proc.communicate() if proc.wait() != 0: if stdouts is not None: - stdouts.append(stdout.decode('UTF-8')) + stdouts.append(stdout.decode("UTF-8")) raise VtyshException( 'vtysh returned status %d for command "%s"' % (proc.returncode, command) ) @@ -582,11 +582,13 @@ end if line.startswith("!") or line.startswith("#"): continue - if (len(ctx_keys) == 2 - and ctx_keys[0].startswith('bfd') - and ctx_keys[1].startswith('profile ') - and line == 'end'): - log.debug('LINE %-50s: popping from sub context, %-50s', line, ctx_keys) + if ( + len(ctx_keys) == 2 + and ctx_keys[0].startswith("bfd") + and ctx_keys[1].startswith("profile ") + and line == "end" + ): + log.debug("LINE %-50s: popping from sub context, %-50s", line, ctx_keys) if main_ctx_key: self.save_contexts(ctx_keys, current_context_lines) @@ -907,9 +909,9 @@ end ctx_keys.append(line) elif ( - line.startswith('profile ') + line.startswith("profile ") and len(ctx_keys) == 1 - and ctx_keys[0].startswith('bfd') + and ctx_keys[0].startswith("bfd") ): # Save old context first @@ -918,7 +920,7 @@ end main_ctx_key = copy.deepcopy(ctx_keys) log.debug( "LINE %-50s: entering BFD profile sub-context, append to ctx_keys", - line + line, ) ctx_keys.append(line) |