From: Brian Warner Date: Wed, 30 May 2012 07:17:55 +0000 (-0700) Subject: node.py: stop stripping whitespace in write_private_config() X-Git-Url: https://git.rkrishnan.org/simplejson/statistics?a=commitdiff_plain;h=3ba77925d928f345e7c0120cf11be5c3475af436;p=tahoe-lafs%2Ftahoe-lafs.git node.py: stop stripping whitespace in write_private_config() It's nice to add newlines to the saved file, so 'cat' is easy to use. We still strip on the input side, in get_or_create_private_config(). --- diff --git a/src/allmydata/node.py b/src/allmydata/node.py index aedaf842..486650e1 100644 --- a/src/allmydata/node.py +++ b/src/allmydata/node.py @@ -225,11 +225,10 @@ class Node(service.MultiService): def write_private_config(self, name, value): """Write the (string) contents of a private config file (which is a config file that resides within the subdirectory named 'private'), and - return it. Any leading or trailing whitespace will be stripped from - the data. + return it. """ privname = os.path.join(self.basedir, "private", name) - open(privname, "w").write(value.strip()) + open(privname, "w").write(value) def get_or_create_private_config(self, name, default=_None): """Try to get the (string) contents of a private config file (which