From f0e0a2393b48359bc5f580bce9730225741c7c90 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Thu, 16 Jun 2022 11:23:36 -0400 Subject: T2719: make re functions usage in vyos.opmode more consistent --- python/vyos/opmode.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'python') diff --git a/python/vyos/opmode.py b/python/vyos/opmode.py index 10e8770d3..270adc658 100644 --- a/python/vyos/opmode.py +++ b/python/vyos/opmode.py @@ -13,22 +13,19 @@ # You should have received a copy of the GNU Lesser General Public # License along with this library. If not, see . +import re import sys import typing def _is_op_mode_function_name(name): - from re import match - - if match(r"^(show|clear|reset|restart)", name): + if re.match(r"^(show|clear|reset|restart)", name): return True else: return False def _is_show(name): - from re import match - - if match(r"^show", name): + if re.match(r"^show", name): return True else: return False -- cgit v1.2.3