Univention Bugzilla – Attachment 8042 Details for
Bug 42507
Traceback when reading pickle files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
bug_42507.patch
bug_42507.patch (text/plain), 1.29 KB, created by
Arvid Requate
on 2016-09-28 12:54 CEST
(
hide
)
Description:
bug_42507.patch
Filename:
MIME Type:
Creator:
Arvid Requate
Created:
2016-09-28 12:54 CEST
Size:
1.29 KB
patch
obsolete
>Index: ad-connector.py >=================================================================== >--- ad-connector.py (Revision 72821) >+++ ad-connector.py (Arbeitskopie) >@@ -87,12 +87,14 @@ > > ob=(dn, new, old, old_dn) > >- filename=os.path.join(directory,"%f"%time.time()) >+ tmpdir = os.path.join(directory, 'tmp') >+ filename = "%f" % time.time() >+ filepath = os.path.join(tmpdir, filename) > >- _dump_object_to_file(filename, ob) >+ _dump_object_to_file(filepath, ob) > > tmp_array = [] >- f=open(filename, 'r') >+ f=open(filepath, 'r') > tmp_array = cPickle.load(f) > f.close() > >@@ -99,10 +101,10 @@ > tmp_array_len = len(tmp_array) > if tmp_array_len != 4: > univention.debug.debug(univention.debug.LDAP, univention.debug.WARN, 'replacing broken cPickle in %s (len=%s) with plain pickle' % (filename, tmp_array_len)) >- _dump_object_to_file(filename, ob) >+ _dump_object_to_file(filepath, ob) > > tmp_array = [] >- f=open(filename, 'r') >+ f=open(filepath, 'r') > tmp_array = cPickle.load(f) > f.close() > >@@ -110,6 +112,8 @@ > if tmp_array_len != 4: > univention.debug.debug(univention.debug.LDAP, univention.debug.ERROR, 'pickle in %s (len=%s) seems to be broken' % (filename, tmp_array_len)) > >+ os.rename(filepath, os.path.join(directory, filename)) >+ > def handler(dn, new, old, command): > > global group_objects
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 42507
:
8042
|
8054
|
8096
|
8311