Univention Bugzilla – Attachment 7499 Details for
Bug 40652
replace self.lo.search() with getAttr() or get (uldap) if the search is meant to return attributes for a specific object
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
40652.patch (text/plain), 1.11 KB, created by
Florian Best
on 2016-02-24 11:30:52 CET
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Florian Best
Created:
2016-02-24 11:30:52 CET
Size:
1.11 KB
patch
obsolete
>diff --git a/management/univention-directory-manager-modules/modules/univention/admin/handlers/computers/domaincontroller_backup.py b/management/univention-directory-manager-modules/modules/univention/admin/handlers/computers/domaincontroller_backup.py >index ef7b571..b97246c 100644 >--- a/management/univention-directory-manager-modules/modules/univention/admin/handlers/computers/domaincontroller_backup.py >+++ b/management/univention-directory-manager-modules/modules/univention/admin/handlers/computers/domaincontroller_backup.py >@@ -517,9 +517,10 @@ def _ldap_addlist(self): > self.alloc.append(('uidNumber',self.uidNum)) > gidNum='99999' > if self['primaryGroup']: >- searchResult = self.lo.getAttr(self['primaryGroup'], 'gidNumber') >- if searchResult: >- gidNum = searchResult[0] >+ try: >+ gidNum = self.lo.getAttr(self['primaryGroup'], 'gidNumber', required=True)[0] >+ except ldap.NO_SUCH_OBJECT: >+ raise univention.admin.uexceptions.primaryGroup(self['primaryGroup']) > ocs.extend(['posixAccount','shadowAccount']) > al.append(('uidNumber', [self.uidNum])) > al.append(('gidNumber', [gidNum]))
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 40652
:
7498
| 7499