Merge lp:~ed.so/duplicity/duplicity.helpfix into lp:duplicity/0.6

Proposed by edso
Status: Merged
Merged at revision: 859
Proposed branch: lp:~ed.so/duplicity/duplicity.helpfix
Merge into: lp:duplicity/0.6
Diff against target: 18 lines (+3/-3)
1 file modified
duplicity/commandline.py (+3/-3)
To merge this branch: bzr merge lp:~ed.so/duplicity/duplicity.helpfix
Reviewer Review Type Date Requested Status
duplicity-team Pending
Review via email: mp+123611@code.launchpad.net

Description of the change

ix rare 'TypeError: encode() argument 1 must be string, not None'
read here
http://lists.nongnu.org/archive/html/duplicity-talk/2012-09/msg00016.html

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'duplicity/commandline.py'
--- duplicity/commandline.py 2012-05-16 11:03:20 +0000
+++ duplicity/commandline.py 2012-09-10 17:58:19 +0000
@@ -181,11 +181,11 @@
181class OPHelpFix(optparse.OptionParser):181class OPHelpFix(optparse.OptionParser):
182 def _get_encoding(self, file):182 def _get_encoding(self, file):
183 """183 """
184 try to get the encoding or switch to UTF-8184 try to get the encoding or use UTF-8
185 which is default encoding in python3 and most recent unixes185 which is default encoding in python3 and most recent unixes
186 """186 """
187 encoding = getattr(file, "encoding", "UTF-8")187 encoding = getattr(file, "encoding", None)
188 return encoding188 return encoding if encoding else 'utf-8'
189189
190 def print_help(self, file=None):190 def print_help(self, file=None):
191 """191 """

Subscribers

People subscribed via source and target branches

to all changes: