Merge lp:~mterry/duplicity/normalize-before-using into lp:duplicity/0.6
Proposed by
Michael Terry
Status: | Merged |
---|---|
Merged at revision: | 936 |
Proposed branch: | lp:~mterry/duplicity/normalize-before-using |
Merge into: | lp:duplicity/0.6 |
Diff against target: |
20 lines (+3/-2) 1 file modified
duplicity/patchdir.py (+3/-2) |
To merge this branch: | bzr merge lp:~mterry/duplicity/normalize-before-using |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
duplicity-team | Pending | ||
Review via email: mp+195463@code.launchpad.net |
Description of the change
Avoid throwing an exception due to a None element in a patch sequence.
None elements in a (non-normalized) patch sequence are perfectly normal. With the current code in the patched function, it is certainly possible to hit a crash due a None. See http://
This branch fixes that by normalizing the sequence before using it in the logging code. It's acceptable to bring the normalize_ps() call outside the try/except block because normalize_ps is not expected to throw. It's relatively simple and doesn't really use its objects besides checking if they are None.
To post a comment you must log in.