diff options
author | Daniil Baturin <daniil@vyos.io> | 2022-06-16 11:23:36 -0400 |
---|---|---|
committer | Daniil Baturin <daniil@vyos.io> | 2022-06-16 11:23:36 -0400 |
commit | f0e0a2393b48359bc5f580bce9730225741c7c90 (patch) | |
tree | f87a70293204b7e8c413c91dd6107017cc001d10 /python | |
parent | db5952f2bb09a3997b3bef1904497a068fff59ce (diff) | |
download | vyos-1x-f0e0a2393b48359bc5f580bce9730225741c7c90.tar.gz vyos-1x-f0e0a2393b48359bc5f580bce9730225741c7c90.zip |
T2719: make re functions usage in vyos.opmode more consistent
Diffstat (limited to 'python')
-rw-r--r-- | python/vyos/opmode.py | 9 |
1 files changed, 3 insertions, 6 deletions
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 <http://www.gnu.org/licenses/>. +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 |