Ticket #732 (new enhancement)

Opened 6 years ago

Last modified 5 years ago

[PATCH] three tiny patches for moto-sync

Reported by: floe Owned by: andrewb
Priority: normal Milestone:
Component: Plugin: moto Version: 0.38
Severity: normal Keywords:
Cc:

Description

Hi, I'm using 0.36 with moto-sync from SVN and had two issues. First, there's still a reference to hashtable.reset_reports(), which doesn't exist. Second, there's some confusion WRT to timezone-aware and timezone-agnostic date values, leading to a "TypeError?: can't compare offset-naive and offset-aware datetimes".

Yours, Florian

Attachments

moto-sync-patch (951 bytes) - added by floe 6 years ago.

Change History

Changed 6 years ago by floe

comment:1 Changed 6 years ago by floe

  • Version changed from 0.22 to 0.35

Hm, and here's another one:

@@ -611,7 +611,8 @@

elif repeat_type == MOTO_REPEAT_WEEKLY:

appendXMLTag(doc, e, 'Frequency', 'WEEKLY') if repeat_day:

  • repeat_days = moto_repeat_day_to_weekdays(repeat_day, eventdt.weekday()).sort()

+ repeat_days = moto_repeat_day_to_weekdays(repeat_day, eventdt.weekday()) + repeat_days.sort()

appendXMLTag(doc, e, 'ByDay?', ','.join([VCAL_DAYS[n] for n in repeat_days]))

else:

repeat_days = []

Calling .sort() on a list does an in-place sort and returns None, so this is the correct way.

comment:2 Changed 6 years ago by felixmoeller

  • Summary changed from two tiny patches for moto-sync to [PATCH] two tiny patches for moto-sync

comment:3 Changed 6 years ago by dgollub

The hashtable patch-hunk is valid i think. Not quite sure about the timestamp hunk.

floe, could you give some information about your device - so we can try to reproduce the issue? andrewb, could you review the RRULE and timestamp related changes? are those good to go?

comment:4 Changed 6 years ago by floe

I have a Razr V3xx. But I believe all three bugs are independent of the device..

comment:5 Changed 5 years ago by felixmoeller

  • Version changed from 0.35 to 0.38
  • Summary changed from [PATCH] two tiny patches for moto-sync to [PATCH] three tiny patches for moto-sync

this is still valid for current SVN. It is about source:/plugins/moto-sync/motosync.py

The third patch is still valid too:

Index: motosync.py
===================================================================
--- motosync.py (revision 3767)
+++ motosync.py (working copy)
@@ -611,7 +611,8 @@
     elif repeat_type == MOTO_REPEAT_WEEKLY:
         appendXMLTag(doc, e, 'Frequency', 'WEEKLY')
         if repeat_day:
-            repeat_days = moto_repeat_day_to_weekdays(repeat_day, eventdt.weekday()).sort()
+            repeat_days = moto_repeat_day_to_weekdays(repeat_day, eventdt.weekday())
+            repeat_days.sort()
             appendXMLTag(doc, e, 'ByDay', ','.join([VCAL_DAYS[n] for n in repeat_days]))
         else:
             repeat_days = []
Note: See TracTickets for help on using tickets.