Skip to content
This repository has been archived by the owner on Feb 21, 2022. It is now read-only.

Commit

Permalink
Fix TodoistAPI repr string
Browse files Browse the repository at this point in the history
The '<not synchronized>' labe; in some cases was invalid and misleading
  • Loading branch information
imankulov committed May 4, 2015
1 parent 0111423 commit 9deac8e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions todoist/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,8 +565,6 @@ def get_reminder(self, reminder_id):
def __repr__(self):
name = self.__class__.__name__
unsaved = '*' if len(self.queue) > 0 else ''
if self.seq_no == 0:
email = '<not synchronized>'
else:
email = repr(self.state['User']['email'])
return '%s%s(%s)' % (name, unsaved, email)
email = self.user.get('email')
email_repr = repr(email) if email else '<not synchronized>'
return '%s%s(%s)' % (name, unsaved, email_repr)

0 comments on commit 9deac8e

Please sign in to comment.