@@ -163,9 +163,9 @@ def read_node(node): # type: (OrderedDict) -> List[OrderedDict]
163
163
return result
164
164
165
165
166
- def read_error_node (node ): # type: (OrderedDict) -> List[OrderedDict]
167
- # Reads an error node than can contain multiple lists of attributes that themselves contain
168
- # multiple lists of attributes
166
+ def read_error_node (node ): # type: (OrderedDict) -> List[OrderedDict]
167
+ # Reads an error node than can contain multiple lists of attributes that
168
+ # themselves contain multiple lists of attributes
169
169
result = [
170
170
OrderedDict (
171
171
# Feedback nodes can contain error types with further information
@@ -177,10 +177,12 @@ def read_error_node(node): # type: (OrderedDict) -> List[OrderedDict]
177
177
return result
178
178
179
179
180
- def read_error_detail (key , value ): # type: (List[str, OrderedDict]) -> Tuple[str, List[OrderedDict]]
181
- # Xmltodict parses inner error types as Dicts when there is only one item in it even though it may well be a list
182
- # if multiple results were returned. If we find a dict here, wrap it in a list so we can account for only one result or many
183
- # being returned
180
+ def read_error_detail (key , value ):
181
+ # type: (List[str, OrderedDict]) -> Tuple[str, List[OrderedDict]]
182
+ # Xmltodict parses inner error types as Dicts when there is only one item in
183
+ # it even though it may well be a list if multiple results were returned. If
184
+ # we find a dict here, wrap it in a list so we can account for only one
185
+ # result or many being returned
184
186
if not isinstance (value , list ):
185
187
value = [value ]
186
188
return key , \
@@ -192,8 +194,8 @@ def read_error_detail(key, value): # type: (List[str, OrderedDict]) -> Tuple[str
192
194
193
195
194
196
def get_attribute (k , v ):
195
- #Return key, value pair stripping @ from the attributes key
196
- return ( k [1 :], v )
197
+ # Return key, value pair stripping @ from the attributes key
198
+ return k [1 :], v
197
199
198
200
199
201
class AnsibleCMCIModule (object ):
0 commit comments