I got the following errors when using the max-age option.
ERROR:raindrop.proto.imap:unexpected exception
Traceback (most recent call last):
File "/Users/clarkbw/moz/raindrop-reboot/raindrop/raindrop/conductor.py", line 267, in apply_with_retry
return func(*args, **kw)
File "/Users/clarkbw/moz/raindrop-reboot/raindrop/raindrop/proto/imap/__init__.py", line 314, in _doit
func(*args)
File "/Users/clarkbw/moz/raindrop-reboot/raindrop/raindrop/proto/imap/sync.py", line 254, in _update_one_folder
to_fetch = get_to_fetch()
File "/Users/clarkbw/moz/raindrop-reboot/raindrop/raindrop/model/storage.py", line 170, in handler
return func(*args+(storage,), **kw)
File "/Users/clarkbw/moz/raindrop-reboot/raindrop/raindrop/proto/imap/sync.py", line 230, in get_to_fetch
if self.should_fetch_message(message):
File "/Users/clarkbw/moz/raindrop-reboot/raindrop/raindrop/proto/imap/sync.py", line 443, in should_fetch_message
if msg.date< datetime.datetime.utcnow() - datetime.timedelta(seconds=self.options.max_age):
TypeError: can't compare offset-naive and offset-aware datetimes
The attached patch uses the existing UTC offset object in datetime.now()
which is also used in the imap object creation. If this looks like the
right fix I can go ahead and push it.
Cheers,
~ Bryan
Looks good to me!
Thanks,
Mark