Univention Bugzilla – Attachment 6861 Details for
Bug 32331
Enhance upload widget
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
outside loop
32331.patch (text/plain), 1.38 KB, created by
Florian Best
on 2015-04-28 17:03 CEST
(
hide
)
Description:
outside loop
Filename:
MIME Type:
Creator:
Florian Best
Created:
2015-04-28 17:03 CEST
Size:
1.38 KB
patch
obsolete
>diff --git a/ucs-school-4.0r2/ucs-school-umc-distribution/umc/python/distribution/__init__.py b/ucs-school-4.0r2/ucs-school-umc-distribution/umc/python/distribution/__init__.py >index 7ecc23e..5b9cb29 100644 >--- a/ucs-school-4.0r2/ucs-school-umc-distribution/umc/python/distribution/__init__.py >+++ b/ucs-school-4.0r2/ucs-school-umc-distribution/umc/python/distribution/__init__.py >@@ -75,15 +75,15 @@ def upload(self, request): > if not isinstance(request.options, (tuple, list)): > raise UMC_OptionTypeError( 'Expected list of dicts, but got: %s' % str(request.options) ) > >+ # create a temporary upload directory, if it does not already exist >+ if not self._tmpDir: >+ self._tmpDir = tempfile.mkdtemp(prefix='ucsschool-distribution-upload-') >+ MODULE.info('Created temporary directory: %s' % self._tmpDir) >+ > for file in request.options: > if not ('tmpfile' in file and 'filename' in file): > raise UMC_OptionTypeError( 'Invalid upload data, got: %s' % str(file) ) > >- # create a temporary upload directory, if it does not already exist >- if not self._tmpDir: >- self._tmpDir = tempfile.mkdtemp(prefix='ucsschool-distribution-upload-') >- MODULE.info('Created temporary directory: %s' % self._tmpDir) >- > filename = self.__workaround_filename_bug(file) > destPath = os.path.join(self._tmpDir, filename) > MODULE.info('Received file %r, saving it to %r' % (file['tmpfile'], destPath))
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 32331
: 6861