Skip to content

Commit c4b5a98

Browse files
committed
iterate with list comprehension instead of filte
1 parent f8b83fe commit c4b5a98

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

netjsonconfig/backends/airos/airos.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class AirOS(BaseBackend):
5555
def to_intermediate(self):
5656
super(AirOS, self).to_intermediate()
5757
for k, v in self.intermediate_data.items():
58-
self.intermediate_data[k] = filter(lambda x: x != {}, flatten(intermediate_to_list(v)))
58+
self.intermediate_data[k] = [ x for x in flatten(intermediate_to_list(v)) if x != {}]
5959

6060
def flatten(xs):
6161
"""

0 commit comments

Comments
 (0)