security/tinc: Fix switch mode (after #2110) (#2186)

In switch mode the subnet field is empty, thus the 'subnet' key does not exist in the '_payload' dictionary.
This commit is contained in:
vnxme
2021-01-14 15:43:16 +03:00
committed by GitHub
parent e10be2971c
commit 22d222a5dd
@@ -141,7 +141,7 @@ class Host(NetwConfObject):
self._connectTo = value.text
def get_subnets(self):
if not self._payload['subnet']:
if not 'subnet' in self._payload:
return
yield from self._payload['subnet'].split(',')