diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-05-28 19:11:15 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-05-28 19:11:19 +0200 |
commit | 1f7db44a17b02a591d5ff9f64ee0717c697b8a5d (patch) | |
tree | 93d13cedf0bad5d44947ea85a9469169553e1f7d | |
parent | eabc5f1c2e5bfe548cb3d62f2f85f8d61be29b92 (diff) | |
download | vyos-1x-1f7db44a17b02a591d5ff9f64ee0717c697b8a5d.tar.gz vyos-1x-1f7db44a17b02a591d5ff9f64ee0717c697b8a5d.zip |
dummy: T2241: minor code cleanup
No need to call .keys() on a dict when searching for a key. Also drop the
unused "import os" call.
-rwxr-xr-x | src/conf_mode/interfaces-dummy.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/conf_mode/interfaces-dummy.py b/src/conf_mode/interfaces-dummy.py index 44fc9cb9e..55c783f38 100755 --- a/src/conf_mode/interfaces-dummy.py +++ b/src/conf_mode/interfaces-dummy.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2019-2020 VyOS maintainers and contributors +# Copyright (C) 2019-2021 VyOS maintainers and contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 or later as @@ -14,8 +14,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -import os - from sys import exit from vyos.config import Config @@ -42,7 +40,7 @@ def get_config(config=None): return dummy def verify(dummy): - if 'deleted' in dummy.keys(): + if 'deleted' in dummy: verify_bridge_delete(dummy) return None @@ -58,7 +56,7 @@ def apply(dummy): d = DummyIf(dummy['ifname']) # Remove dummy interface - if 'deleted' in dummy.keys(): + if 'deleted' in dummy: d.remove() else: d.update(dummy) |