Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

+13 -13
+13 -13
tools/net/ynl/pyynl/lib/ynl.py
··· 100 100 'bitfield32', 'sint', 'uint']) 101 101 102 102 class NlError(Exception): 103 - def __init__(self, nl_msg): 104 - self.nl_msg = nl_msg 105 - self.error = -nl_msg.error 103 + def __init__(self, nl_msg): 104 + self.nl_msg = nl_msg 105 + self.error = -nl_msg.error 106 106 107 - def __str__(self): 108 - return f"Netlink error: {os.strerror(self.error)}\n{self.nl_msg}" 107 + def __str__(self): 108 + return f"Netlink error: {os.strerror(self.error)}\n{self.nl_msg}" 109 109 110 110 111 111 class ConfigError(Exception): ··· 1039 1039 self.check_ntf() 1040 1040 1041 1041 def operation_do_attributes(self, name): 1042 - """ 1043 - For a given operation name, find and return a supported 1044 - set of attributes (as a dict). 1045 - """ 1046 - op = self.find_operation(name) 1047 - if not op: 1048 - return None 1042 + """ 1043 + For a given operation name, find and return a supported 1044 + set of attributes (as a dict). 1045 + """ 1046 + op = self.find_operation(name) 1047 + if not op: 1048 + return None 1049 1049 1050 - return op['do']['request']['attributes'].copy() 1050 + return op['do']['request']['attributes'].copy() 1051 1051 1052 1052 def _encode_message(self, op, vals, flags, req_seq): 1053 1053 nl_flags = Netlink.NLM_F_REQUEST | Netlink.NLM_F_ACK