tiramisu/tiramisu/option/macoption.py

35 lines
1.3 KiB
Python
Raw Normal View History

2019-12-02 10:39:10 +01:00
# -*- coding: utf-8 -*-
2024-07-06 14:33:25 +02:00
# Copyright (C) 2020-2024 Team tiramisu (see AUTHORS for all contributors)
2019-12-02 10:39:10 +01:00
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# The original `Config` design model is unproudly borrowed from
# the rough pypy's guys: http://codespeak.net/svn/pypy/dist/pypy/config/
# the whole pypy projet is under MIT licence
# ____________________________________________________________
2023-05-11 15:44:48 +02:00
"""MACOption
"""
2019-12-02 10:39:10 +01:00
import re
from ..i18n import _
from .stroption import RegexpOption
class MACOption(RegexpOption):
2024-10-31 08:53:58 +01:00
"""represents the choice of a mac address"""
2019-12-02 10:39:10 +01:00
__slots__ = tuple()
_regexp = re.compile(r"^([0-9A-Fa-f]{2}[:]){5}([0-9A-Fa-f]{2})$")
2024-10-31 08:53:58 +01:00
_type = "mac address"