]> git.puffer.fish Git - matthieu/frr.git/commitdiff
tools: frr-reload.py changes to make black happy
authorDon Slice <dslice@nvidia.com>
Fri, 19 Mar 2021 19:03:51 +0000 (15:03 -0400)
committerDon Slice <dslice@nvidia.com>
Wed, 31 Mar 2021 16:38:59 +0000 (09:38 -0700)
Since black is finding issues before applying my change, committing
those changes separately

Signed-off-by: Don Slice <dslice@nvidia.com>
tools/frr-reload.py

index 1461e0f2960f01925c56e0a02d8e5bb85cdbecde..75d6b62d4fe2d2d4ca610b69f580173a4775c698 100755 (executable)
@@ -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)