fix spacing issues

master
brent s 2 years ago
parent 7249d88bad
commit 06b32e7154
Signed by: bts
GPG Key ID: 8C004C2F93481F6B
  1. 6
      bootsync.py

@ -52,7 +52,7 @@ class BootSync(object):
# self.logger.error('{0} is invalid XML'.format(self.cfgfile))
raise ValueError(('{0} does not seem to be valid XML. '
'See sample.config.xml for an example configuration.').format(self.cfgfile))
self.ns = self.cfg.nsmap.get(None, 'http://git.square-r00t.net/OpTools/tree/sys/BootSync/')
self.ns = self.cfg.nsmap.get(None, 'http://git.square-r00t.net/BootSync/')
self.ns = '{{{0}}}'.format(self.ns)
if validate:
if not self.schema:
@ -60,7 +60,7 @@ class BootSync(object):
xsi = self.cfg.nsmap.get('xsi', 'http://www.w3.org/2001/XMLSchema-instance')
schemaLocation = '{{{0}}}schemaLocation'.format(xsi)
schemaURL = self.cfg.attrib.get(schemaLocation,
('http://git.square-r00t.net/OpTools/plain/sys/BootSync/bootsync.xsd'))
('https://git.square-r00t.net/BootSync/plain/bootsync.xsd'))
with urlopen(schemaURL) as url:
self.schema = url.read()
self.schema = etree.XMLSchema(etree.XML(self.schema))
@ -233,7 +233,7 @@ class BootSync(object):
line = re.sub(r'(?<!\=UUID\=){0}'.format(self.dummy_uuid),
self.blkids[disk],
line)
line = re.sub(r'(^\s*|\s+)/boot', '', line)
line = re.sub(r'(^\s*|\s+)/boot', r'\g<1>', line)
f.write('{0}\n'.format(line))
return()


Loading…
Cancel
Save