1071
|
|
|
Kenneth Loafman |
9 years ago
|
|
|
1070
|
|
* Misc fixes for the following PEP8 issues: - E231, E241, E251, E261, E262, E271, E272, E301, E302, E303, E502, E701, E702, E703, E711, E721, W291, W292, W293, W391 - see http://pep8.readthedocs.org
|
Kenneth Loafman |
9 years ago
|
|
|
1065
|
|
|
Kenneth Loafman |
9 years ago
|
|
|
1033
|
|
|
Kenneth Loafman |
9 years ago
|
|
|
975
|
|
|
Kenneth Loafman |
10 years ago
|
|
|
945
|
|
* Merged in lp:~mterry/duplicity/encoding - This branch hopefully fixes two filename encoding issues: - Users in bug 989496 were noticing a UnicodeEncodeError exception which happens (as far as I can tell) because some backends (like webdav) are returning unicode filenames from list(). When these filenames are combined with the utf8 translations of log messages, either (A) the default ascii encoding can't handle promoting the utf8 bytes or -- if there aren't any utf8 bytes in the translation -- (B) the resulting unicode string raises an error later when log.py tries to upgrade the string again to unicode for printing. - This fix is largely implemented by adding a wrapper for backend list() implementations. This wrapper ensures that duplicity internals always see a byte string. (I'd like to eventually use this same wrapping strategy to implement generic retry support without backends having to add any logic, but that's just a thought for the future.) - That is, the fix for issue #1 is completely inside backend.py and the changes to backends/*.py. - The rest of the invasive changes deal with filenames that may not be valid utf8. This is much rarer, but possible. For proper handling of this, we need to print using unicode, and convert filenames from the system filename encoding to unicode, gracefully handling conversion errors. Some of the filenames we print are remote names. Who knows what encoding they are in; it could be different than the system filename encoding. 99% of the time, everything will be utf8 and we're fine. If we do get conversion errors, the only effect should be some question mark characters in duplicity logging output. - I tried to convert as much of the actual codebase to use unicode for printing. But I stopped short of adding an assert in log.py to enforce unicode, because I didn't want to go through all the backend code and manually adjust those bits without being able to test each one.
|
Kenneth Loafman |
10 years ago
|
|
|
903
|
|
|
Kenneth Loafman |
11 years ago
|
|
|
869
|
|
|
Kenneth Loafman |
11 years ago
|
|
|
790
|
|
|
kenneth at loafman |
12 years ago
|
|
|
783
|
|
|
Kenneth Loafman |
12 years ago
|
|
|
773
|
|
|
Kenneth Loafman |
12 years ago
|
|
|
749
|
|
|
Kenneth Loafman |
12 years ago
|
|
|
748
|
|
|
Kenneth Loafman |
12 years ago
|
|
|
721
|
|
|
Kenneth Loafman |
13 years ago
|
|
|
680
|
|
|
Kenneth Loafman |
13 years ago
|
|
|
656
|
|
|
Kenneth Loafman |
13 years ago
|
|
|
631
|
|
|
ken |
14 years ago
|
|
|
626
|
|
|
ken |
14 years ago
|
|
|
555
|
|
|
Kenneth Loafman |
14 years ago
|
|
|
553
|
|
|
Kenneth Loafman |
14 years ago
|
|
|