summaryrefslogtreecommitdiff
path: root/tools/net/ynl/pyynl/lib/ynl.py
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2025-10-27 12:29:57 -0700
committerJakub Kicinski <kuba@kernel.org>2025-10-28 16:35:06 -0700
commit09e2603513841c48e5422d132f57f8a4c7337721 (patch)
tree132d92dd85474eebcda4745d01d0ffa4c132dc86 /tools/net/ynl/pyynl/lib/ynl.py
parentcebba694d26d29467615c641a8fefd5b2cd4a1aa (diff)
tools: ynl: fix indent issues in the main Python lib
Class NlError() and operation_do_attributes() are indented by 2 spaces rather than 4 spaces used by the rest of the file. Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://patch.msgid.link/20251027192958.2058340-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/net/ynl/pyynl/lib/ynl.py')
-rw-r--r--tools/net/ynl/pyynl/lib/ynl.py28
1 files changed, 14 insertions, 14 deletions
diff --git a/tools/net/ynl/pyynl/lib/ynl.py b/tools/net/ynl/pyynl/lib/ynl.py
index 62383c70ebb9..bdcc4f031d39 100644
--- a/tools/net/ynl/pyynl/lib/ynl.py
+++ b/tools/net/ynl/pyynl/lib/ynl.py
@@ -100,12 +100,12 @@ class Netlink:
'bitfield32', 'sint', 'uint'])
class NlError(Exception):
- def __init__(self, nl_msg):
- self.nl_msg = nl_msg
- self.error = -nl_msg.error
+ def __init__(self, nl_msg):
+ self.nl_msg = nl_msg
+ self.error = -nl_msg.error
- def __str__(self):
- return f"Netlink error: {os.strerror(self.error)}\n{self.nl_msg}"
+ def __str__(self):
+ return f"Netlink error: {os.strerror(self.error)}\n{self.nl_msg}"
class ConfigError(Exception):
@@ -1039,15 +1039,15 @@ class YnlFamily(SpecFamily):
self.check_ntf()
def operation_do_attributes(self, name):
- """
- For a given operation name, find and return a supported
- set of attributes (as a dict).
- """
- op = self.find_operation(name)
- if not op:
- return None
-
- return op['do']['request']['attributes'].copy()
+ """
+ For a given operation name, find and return a supported
+ set of attributes (as a dict).
+ """
+ op = self.find_operation(name)
+ if not op:
+ return None
+
+ return op['do']['request']['attributes'].copy()
def _encode_message(self, op, vals, flags, req_seq):
nl_flags = Netlink.NLM_F_REQUEST | Netlink.NLM_F_ACK