nncli

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

commit b29c466b5daf80f3cfc7d6aaea7014ce51e42f95
parent 17b8c753827c3dc8bb98d942220255bd8c11477d
Author: Eric Davis <edavis@insanum.com>
Date:   Thu,  3 Jul 2014 13:02:26 -0700

fixed crash that occurred when no notes were synced yet

Diffstat:
Mview_titles.py | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/view_titles.py b/view_titles.py @@ -11,8 +11,6 @@ def __init__(self, config, args): self.status_message = args['status_message'] self.note_list, match_regex, self.all_notes_cnt = \ self.ndb.filter_notes(self.search_string) - if len(self.note_list) == 0: - self.status_message(u'No notes found!') super(ViewTitles, self).__init__( urwid.SimpleFocusListWalker(self.get_note_titles())) @@ -23,6 +21,8 @@ def update_note_list(self, search_string): self.body[:] = \ urwid.SimpleFocusListWalker(self.get_note_titles()) self.focus_position = 0 + if len(self.note_list) == 0: + self.status_message(u'No notes found!') def format_title(self, note): """