nncli

NextCloud Notes Command Line Interface
git clone git://git.danielmoch.com/nncli.git
Log | Files | Refs | LICENSE

commit a1ab124a3fc38e0b36dfa1f7ea30346374fbfa38
parent 39df283b0b0b421a4a10502ae8af0572dabbb32d
Author: Samuel Walladge <samuel@swalladge.id.au>
Date:   Tue, 31 May 2016 11:30:28 +0930

fix crash when viewing json data with unicode characters

Diffstat:
Msimplenote_cli/temp.py | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/simplenote_cli/temp.py b/simplenote_cli/temp.py @@ -8,7 +8,8 @@ def tempfile_create(note, raw=False): if raw: # dump the raw json of the note tf = tempfile.NamedTemporaryFile(suffix='.json', delete=False) - json.dump(note, tf, indent=2) + contents = json.dumps(note, indent=2) + tf.write(contents.encode('utf-8')) tf.flush() else: ext = '.txt'