summaryrefslogtreecommitdiff
path: root/src/validators/mac-address
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-04-03 14:27:34 +0200
committerChristian Poessinger <christian@poessinger.com>2020-04-03 14:27:34 +0200
commit72d0d8768f03ce78dff29404e1e73ee39ff2fc39 (patch)
treeca4ac4c2c9ddef74d3f438964eb9c9d76635d904 /src/validators/mac-address
parentb9cdf13c0604730f2bf45fca9d3b5a8388796d1b (diff)
downloadvyos-1x-72d0d8768f03ce78dff29404e1e73ee39ff2fc39.tar.gz
vyos-1x-72d0d8768f03ce78dff29404e1e73ee39ff2fc39.zip
validate: mac: autopep8
Diffstat (limited to 'src/validators/mac-address')
-rwxr-xr-xsrc/validators/mac-address18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/validators/mac-address b/src/validators/mac-address
index d6ec6d712..435920b84 100755
--- a/src/validators/mac-address
+++ b/src/validators/mac-address
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
#
-# Copyright (C) 2018 VyOS maintainers and contributors
+# Copyright (C) 2018-2020 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
@@ -13,16 +13,14 @@
#
# 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 sys
import re
+from sys import exit, argv
-if len(sys.argv) == 2:
- pattern = "^([0-9A-Fa-f]{2}[:]){5}([0-9A-Fa-f]{2})$"
- if re.match(pattern, sys.argv[1]):
- sys.exit(0)
- else:
- sys.exit(1)
+if len(argv) == 2:
+ pattern = "^([0-9A-Fa-f]{2}[:]){5}([0-9A-Fa-f]{2})$"
+ if re.match(pattern, argv[1]):
+ exit(0)
+ else:
+ exit(1)