|
3 |
import univention.admin.objects |
3 |
import univention.admin.objects |
4 |
import univention.admin.uldap as uldap |
4 |
import univention.admin.uldap as uldap |
5 |
import univention.admin.modules as modules |
5 |
import univention.admin.modules as modules |
6 |
from univention.admin.uexceptions import base as UniventionBaseException |
6 |
from univention.admin.uexceptions import base as UniventionBaseException, noObject |
7 |
from ldap import LDAPError |
7 |
from ldap import LDAPError |
8 |
|
8 |
|
9 |
|
9 |
|
Lines 66-73
def _remove_old_network(self):
|
Link Here
|
---|
|
66 |
network_dn = "cn=default,cn=networks,%(ldap/base)s" % self.changeset.ucr |
66 |
network_dn = "cn=default,cn=networks,%(ldap/base)s" % self.changeset.ucr |
67 |
network_module = modules.get("networks/network") |
67 |
network_module = modules.get("networks/network") |
68 |
modules.init(self.ldap, self.position, network_module) |
68 |
modules.init(self.ldap, self.position, network_module) |
69 |
network = univention.admin.objects.get(network_module, None, self.ldap, self.position, network_dn) |
69 |
try: |
70 |
if not network.exists(): |
70 |
network = univention.admin.objects.get(network_module, None, self.ldap, self.position, network_dn) |
|
|
71 |
except noObject: |
71 |
return |
72 |
return |
72 |
self.logger.info("Removing '%s'...", network_dn) |
73 |
self.logger.info("Removing '%s'...", network_dn) |
73 |
if not self.changeset.no_act: |
74 |
if not self.changeset.no_act: |