Definition at line 148 of file SerialSubstitution.py.
def SerialSubstitution.WarningClass.__init__ |
( |
|
self, |
|
|
|
match, |
|
|
|
message, |
|
|
|
exceptions = [] |
|
) |
| |
Definition at line 149 of file SerialSubstitution.py.
149 def __init__(self, match, message, exceptions = []):
150 SubstitutionClass.__init__(self)
151 if hasattr(match,
'search'):
156 self.
regex = re.compile(match)
def __init__(self, match, message, exceptions=[])
def SerialSubstitution.WarningClass.__call__ |
( |
|
self, |
|
|
|
s, |
|
|
|
context = None |
|
) |
| |
Definition at line 163 of file SerialSubstitution.py.
165 if pattern.search(s)
is not None:
return s
166 match = self.regex.search(s)
167 if match
is not None:
168 msg = match.expand(self.
msg)
171 "From line '%s': %s", s,
176 "From %s: %s\n => %s",
180 logging.debug(
"(pattern: %r on %r)", self.regex.pattern, s)
def __call__(self, s, context=None)
def Colorize(msg, category, options)
Library code.
def SerialSubstitution.WarningClass.__str__ |
( |
|
self | ) |
|
def SerialSubstitution.WarningClass.Describe |
( |
|
self | ) |
|
SerialSubstitution.WarningClass.exceptions |
SerialSubstitution.WarningClass.msg |
SerialSubstitution.WarningClass.pattern |
SerialSubstitution.WarningClass.regex |
The documentation for this class was generated from the following file: