1
# Copyright 2010-2011 Canonical Ltd. This software is licensed under the
2
# GNU Affero General Public License version 3 (see the file LICENSE).
10
from re import compile
11
from string import hexdigits
14
ADDRESS_RE = compile(r"^.*eth.*(?P<address>([%(hex)s]{2}:){5}[%(hex)s]{2})"
20
def __init__(self, stream):
23
def run(self, result):
24
for line in self.stream:
25
match = ADDRESS_RE.match(line)
27
address = match.group("address")
28
result.addAddress(address)