summaryrefslogtreecommitdiff
path: root/python/vyos
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-07-25 17:53:32 +0200
committerChristian Poessinger <christian@poessinger.com>2020-07-25 17:53:32 +0200
commite57d76e86f7e5280eb065e98552c7d6395805c01 (patch)
treea19acc0f40860c74c41cdc1b3a6c6269da08b9ee /python/vyos
parente70a304e36fc6456e16fea81ace4a0a5fd8bd1df (diff)
downloadvyos-1x-e57d76e86f7e5280eb065e98552c7d6395805c01.tar.gz
vyos-1x-e57d76e86f7e5280eb065e98552c7d6395805c01.zip
vyos.configverify: T2653: fix some formatting issues
Diffstat (limited to 'python/vyos')
-rw-r--r--python/vyos/configverify.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/python/vyos/configverify.py b/python/vyos/configverify.py
index 36b10c956..8e06d16f2 100644
--- a/python/vyos/configverify.py
+++ b/python/vyos/configverify.py
@@ -79,12 +79,12 @@ def verify_source_interface(config):
required by e.g. peth/MACvlan, MACsec ...
"""
from netifaces import interfaces
- if not 'source_interface' in config.keys():
+ if 'source_interface' not in config:
raise ConfigError('Physical source-interface required for '
'interface "{ifname}"'.format(**config))
- if not config['source_interface'] in interfaces():
- raise ConfigError(f'Source interface {source_interface} does not '
- f'exist'.format(**config))
+ if config['source_interface'] not in interfaces():
+ raise ConfigError('Source interface {source_interface} does not '
+ 'exist'.format(**config))
def verify_dhcpv6(config):
"""