Commit d89dafbd authored by Xavier Thompson's avatar Xavier Thompson

slapformat: WIP: Cleanup tap code

parent bab1f2fa
...@@ -501,7 +501,6 @@ class Tap(object): ...@@ -501,7 +501,6 @@ class Tap(object):
self.ipv6_address = addressFromNetwork(ipv6_gateway.network, -1) self.ipv6_address = addressFromNetwork(ipv6_gateway.network, -1)
def format(self, interface, user): def format(self, interface, user):
tap = self.name
conf = interface.conf conf = interface.conf
# Create/ensure tap interface # Create/ensure tap interface
self.ensureTap(user, conf) self.ensureTap(user, conf)
...@@ -525,7 +524,7 @@ class Tap(object): ...@@ -525,7 +524,7 @@ class Tap(object):
if owner_id != user_id: if owner_id != user_id:
conf.abort( conf.abort(
"Wrong owner of tap %s, expected %s (%s) got %s", "Wrong owner of tap %s, expected %s (%s) got %s",
self.name, user_id, user, owner_id tap, user_id, user, owner_id
) )
else: else:
call(['ip', 'tuntap', 'add', 'dev', tap, 'mode', 'tap', 'user', user]) call(['ip', 'tuntap', 'add', 'dev', tap, 'mode', 'tap', 'user', user])
......
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