Commit aad13817 authored by Tomáš Peterka's avatar Tomáš Peterka Committed by Rafael Monnerat

[format] Use own logger for logging because the builtin is used for testing

parent 81748d83
...@@ -60,6 +60,10 @@ from slapos.util import mkdir_p ...@@ -60,6 +60,10 @@ from slapos.util import mkdir_p
import slapos.slap as slap import slapos.slap as slap
from slapos import version from slapos import version
logger = logging.getLogger("slapos.format")
def prettify_xml(xml): def prettify_xml(xml):
root = lxml.etree.fromstring(xml) root = lxml.etree.fromstring(xml)
return lxml.etree.tostring(root, pretty_print=True) return lxml.etree.tostring(root, pretty_print=True)
...@@ -946,9 +950,9 @@ class Interface(object): ...@@ -946,9 +950,9 @@ class Interface(object):
if self.isBridge(): if self.isBridge():
callAndRead(['brctl', 'addif', self.name, tap.name]) callAndRead(['brctl', 'addif', self.name, tap.name])
else: else:
self.logger.warning("Interface slapos.cfg:interface_name={} is not a bridge." logger.warning("Interface slapos.cfg:interface_name={} is not a bridge."
"TUN/TAP interface {} might not have internet connection." "TUN/TAP interface {} might not have internet connection."
"".format(self.name, tap.name)) "".format(self.name, tap.name))
def _addSystemAddress(self, address, netmask, ipv6=True): def _addSystemAddress(self, address, netmask, ipv6=True):
"""Adds system address to interface """Adds system address to interface
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment