Univention Bugzilla – Attachment 8115 Details for
Bug 25404
directory-logger Fehlermeldungen
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
25404.patch
file_25404.txt (text/plain), 1.44 KB, created by
Philipp Hahn
on 2016-10-17 14:27 CEST
(
hide
)
Description:
25404.patch
Filename:
MIME Type:
Creator:
Philipp Hahn
Created:
2016-10-17 14:27 CEST
Size:
1.44 KB
patch
obsolete
>diff --git a/branches/ucs-4.1/ucs-4.1-3/management/univention-directory-logger/directory_logger.py b/branches/ucs-4.1/ucs-4.1-3/management/univention-directory-logger/directory_logger.py >index 3fdda04..3073e92 100755 >--- a/branches/ucs-4.1/ucs-4.1-3/management/univention-directory-logger/directory_logger.py >+++ b/branches/ucs-4.1/ucs-4.1-3/management/univention-directory-logger/directory_logger.py >@@ -211,8 +211,14 @@ def handler(dn, new, old): > > # 2. generate log record > if new_copy: >- modifier = new_copy['modifiersName'][0] >- timestamp = ldapTime2string( new_copy['modifyTimestamp'][0] ) >+ try: >+ modifier = new_copy['modifiersName'][0] >+ except LookupError: >+ modifier = '<unknown>' >+ try: >+ timestamp = ldapTime2string(new_copy['modifyTimestamp'][0]) >+ except LookupError: >+ timestamp = '<unknown>' > > if not old_copy: # create branch > record = headerfmt % (previoushash, dn, id, modifier, timestamp, 'add') >@@ -279,8 +285,7 @@ def createFile(filename, withdirs=False ): > if not os.path.exists( basedir ): > os.makedirs( basedir ) > >- returncode = subprocess.call(["/bin/touch", "%s" % filename ]) >- if not os.path.exists( filename ): >+ if subprocess.call(["/bin/touch", filename ]) or not os.path.exists(filename): > univention.debug.debug(univention.debug.LISTENER, univention.debug.ERROR, '%s: %s could not be created.' % (name, filename) ) > return 1 > os.chown(filename, uidNumber, gidNumber)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 25404
: 8115