~mterry/duplicity/unicode-future

« back to all changes in this revision

Viewing changes to duplicity/commandline.py

  • Committer: Aaron A Whitehouse
  • Date: 2017-06-13 20:39:51 UTC
  • Revision ID: lists@whitehouse.kiwi.nz-20170613203951-9tyi2i2v6auuvijg
* Remove util.bytes_to_uc (as either .decode or fsdecode is preferable).
* Move unicode conversion for select options from selection.py to commandline.py.

Show diffs side-by-side

added added

removed removed

Lines of Context:
252
252
        globals.time_separator = sep
253
253
        old_fn_deprecation(opt)
254
254
 
255
 
    def add_selection(o, s, v, p):
256
 
        select_opts.append((s, v))
 
255
    def add_selection(o, option, additional_arg, p):
 
256
        option = util.fsdecode(option)
 
257
        additional_arg = util.fsdecode(additional_arg)
 
258
        select_opts.append((option, additional_arg))
257
259
 
258
260
    def add_filelist(o, s, v, p):
259
 
        filename = v
260
 
        select_opts.append((s, filename))
 
261
        filename = util.fsdecode(v)
 
262
        select_opts.append((util.fsdecode(s), filename))
261
263
        try:
262
264
            select_files.append(io.open(filename, "rt", encoding="UTF-8"))
263
265
        except IOError: