Skip to content

Commit

Permalink
Simplify some logic to remove type comparisons (for a field we don't …
Browse files Browse the repository at this point in the history
…even use anyways)
  • Loading branch information
mikeboers committed Aug 5, 2015
1 parent 64d93ac commit a58e61c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions sgevents/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,8 @@ def filter_new(self, entities):
else:
self.max_complete_id = self.max_partial_id

# There is a little juggling going on here to make sure we don't
# care about the type of the `last_time`.
last_time = max(e['created_at'] for e in entities)
self.last_time = max(self.last_time, last_time) if self.last_time else last_time
# We don't use this ourselves after the first scan, but it may be nice to have.
self.last_time = max(e['created_at'] for e in entities)

return unseen_entities

Expand Down

0 comments on commit a58e61c

Please sign in to comment.