I downloaded and installed the 0.22 moto-sync plugin to work with my V3, there were a few issues but it mostly worked.
A few changes were required but not many, mostly to do with ensuring the data received is of the correct size otherwise there are a few out of range errors.
As I can't attach the patch as a file, here it is
diff -uNr libopensync-plugin-moto-0.22/motosync.py libopensync-plugin-moto-0.22.b/motosync.py
--- libopensync-plugin-moto-0.22/motosync.py 2007-03-27 12:49:49.000000000 +0100
+++ libopensync-plugin-moto-0.22.b/motosync.py 2007-09-02 17:21:36.000000000 +0100
@@ -1220,11 +1220,19 @@
self.firstlast_index = data[12]
assert(data[14] == 0) # unknown?
assert(data[15] == 0) # unknown?
- self.nickname = data[22]
- if data[23] == '':
- self.birthday = None
+ if len(data) >= 21:
+ self.nickname = data[22]
+ else:
+ self.nickname = None
+
+ if len(data) >= 22:
+ if data[23] == '':
+ self.birthday = None
+ else:
+ self.birthday = parse_moto_time(data[23])
else:
- self.birthday = parse_moto_time(data[23])
+ self.birthday = None
+
if len(data) >= 25:
assert(data[24] == '') # unknown? old phones don't have it
@@ -1309,9 +1317,10 @@
contacts[i] = (moto_type, content, True)
break
else:
- # no non-email contacts, so just make the first email preferred
- (moto_type, content, _) = contacts[0]
- contacts[0] = (moto_type, content, True)
+ if type(contacts) == list and len(contacts) > 0:
+ # no non-email contacts, so just make the first email preferred
+ (moto_type, content, _) = contacts[0]
+ contacts[0] = (moto_type, content, True)
# process addresses, create a hash from contacttype to address
# FIXME: addresses that don't map to moto contact types are dropped
@@ -1435,7 +1444,10 @@
"""Phone contact child object for children created from phone data."""
def __init__(self, parent, data):
assert(type(data) == list and len(data) >= 24)
- adr = (data[17], data[16], data[18], data[19], data[20], data[21])
+ if len(data) >= 20:
+ adr = (data[17], data[16], data[18], data[19], data[20], data[21])
+ else:
+ adr = ("", "", "", "", "", "")
PhoneContactChild.__init__(self, parent, data[1], data[4], data[8], adr)
self.pos = data[0]
self.numtype = data[2]