Merge lp:~rvb/maas/retry-with-files into lp:~maas-committers/maas/trunk
Proposed by
Raphaël Badin
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Raphaël Badin | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 3708 | ||||
Proposed branch: | lp:~rvb/maas/retry-with-files | ||||
Merge into: | lp:~maas-committers/maas/trunk | ||||
Diff against target: |
270 lines (+93/-34) 2 files modified
src/maasserver/utils/tests/test_views.py (+70/-26) src/maasserver/utils/views.py (+23/-8) |
||||
To merge this branch: | bzr merge lp:~rvb/maas/retry-with-files | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gavin Panella (community) | Approve | ||
Review via email: mp+253966@code.launchpad.net |
Commit message
When retrying a view, restore the request's _files attribute so that the files can be re-read again. Previously, the read files would be reused and reading them again would return an empty string.
To post a comment you must log in.
This is good, and it should land.
I did have a thought about it while reviewing. I'm a little concerned about the use (internally) of NamedTemporaryFile, and how copies of it will behave. I put together an incomplete alternative, which resets the input stream at the WSGI level: http:// paste.ubuntu. com/10671243/