nncli

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

commit 358d0992fbc066209ddef547c17744892dc1d7c7
parent 135ad6914de23c5e3cd30398849454df18d34f9f
Author: Daniel Moch <daniel@danielmoch.com>
Date:   Fri,  9 Nov 2018 19:36:22 -0500

Fix broken references to note keys

Diffstat:
Mnncli/notes_db.py | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/nncli/notes_db.py b/nncli/notes_db.py @@ -631,15 +631,15 @@ def sync_notes(self, server_sync=True, full_sync=True): # sync done, now write changes to db_path - for k in list(local_updates.keys()): + for key in list(local_updates.keys()): try: - self._helper_save_note(k, self.notes[k]) + self._helper_save_note(key, self.notes[key]) except WriteError as ex: raise WriteError(str(ex)) self.log("Saved note to disk (key={0})".format(key)) - for k in list(local_deletes.keys()): - fnote = self._helper_key_to_fname(k) + for key in list(local_deletes.keys()): + fnote = self._helper_key_to_fname(key) if os.path.exists(fnote): os.unlink(fnote) self.log("Deleted note from disk (key={0})".format(key)) @@ -686,7 +686,7 @@ def sync_now(self, do_server_sync=True): """Sync the notes to the server""" self.sync_lock.acquire() self.sync_notes(server_sync=do_server_sync, - full_sync=True if not self.last_sync else False) + full_sync=True if not self.last_sync else False) self.sync_lock.release() def sync_worker(self, do_server_sync):