Skip to content

Commit

Permalink
wrap long line
Browse files Browse the repository at this point in the history
  • Loading branch information
david415 authored and daira committed Jul 20, 2015
1 parent 48a8dfd commit 847e8e9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/allmydata/scripts/magic_folder_cli.py
Expand Up @@ -140,7 +140,9 @@ def join(options):

fileutil.write(dmd_cap_file, options.dmd_write_cap)
fileutil.write(collective_readcap_file, options.magic_readonly_cap)
fileutil.write(os.path.join(options["node-directory"], "tahoe.cfg"), "[magic_folder]\nenabled = True\nlocal.directory = %s\n" % (options.local_dir.encode('utf-8'),), mode="ab")
fileutil.write(os.path.join(options["node-directory"], "tahoe.cfg"),
"[magic_folder]\nenabled = True\nlocal.directory = %s\n"
% (options.local_dir.encode('utf-8'),), mode="ab")

This comment has been minimized.

Copy link
@daira

daira Sep 2, 2015

Member

I just noticed that this can do the wrong thing if tahoe.cfg ends with an unterminated line. Also there may already be a [magic_folder] section.

I think there is code for editing a tahoe.cfg file elsewhere already, but I can't remember where.

return 0

class MagicFolderCommand(BaseOptions):
Expand Down

0 comments on commit 847e8e9

Please sign in to comment.