Univention Bugzilla – Attachment 7009 Details for
Bug 38856
Traceback creating existing UDM object with policies
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Patch tracebacks
file_38856.txt (text/plain), 1.99 KB, created by
Philipp Hahn
on 2015-07-08 10:10:42 CEST
(
hide
)
Description:
Patch tracebacks
Filename:
MIME Type:
Creator:
Philipp Hahn
Created:
2015-07-08 10:10:42 CEST
Size:
1.99 KB
patch
obsolete
>diff --git a/branches/ucs-4.0/ucs-4.0-2/management/univention-directory-manager-modules/modules/univention/admincli/admin.py b/branches/ucs-4.0/ucs-4.0-2/management/univention-directory-manager-modules/modules/univention/admincli/admin.py >index d309378..c9605eb 100755 >--- a/branches/ucs-4.0/ucs-4.0-2/management/univention-directory-manager-modules/modules/univention/admincli/admin.py >+++ b/branches/ucs-4.0/ucs-4.0-2/management/univention-directory-manager-modules/modules/univention/admincli/admin.py >@@ -1,3 +1,4 @@ >+#!/usr/bin/python2.7 > # -*- coding: utf-8 -*- > # > # Univention Admin Modules >@@ -802,8 +803,9 @@ def _doit(arglist): > exists_msg=None > try: > dn=object.create() >- except univention.admin.uexceptions.objectExists, dn: >- exists_msg = dn >+ except univention.admin.uexceptions.objectExists as ex: >+ exists_msg = '%s' % (ex,) >+ dn = ex.args[0] > if not ignore_exists: > out.append('E: Object exists: %s' % exists_msg) > return out + ["OPERATION FAILED"] >@@ -885,7 +887,7 @@ def _doit(arglist): > if extraAttributes: > lo.modify(dn,extraAttributes) > >- if policy_reference: >+ if not exists and policy_reference: > lo.modify(dn,[('objectClass','','univentionPolicyReference')]) > modlist=[] > for el in policy_reference: >@@ -1258,3 +1260,8 @@ def _doit(arglist): > return out + ["OPERATION FAILED"] > > return out # nearly the only successfull return >+ >+ >+if __name__ == '__main__': >+ import sys >+ print '\n'.join(doit(sys.argv))
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 Raw
Actions:
View
Attachments on
bug 38856
: 7009 |
8985