Changeset 2485

Show
Ignore:
Timestamp:
08/23/07 13:38:39 (1 year ago)
Author:
abaumann
Message:

untested fix for problem in issue #523

this should make sure that events in the extended format are written
with fields 7 and 20 as completely empty (ie. ...... instead of
...,"",... in the arguments to AT+MDBW)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/moto-sync/motosync.py

    r2431 r2485  
    11471147            elif t == types.StringType or val == '': 
    11481148                return '"%s"' 
    1149             elif t == types.UnicodeType
     1149            elif t == types.UnicodeType or val is None
    11501150                return '%s' 
    11511151            else: 
     
    11601160                # actually does support as its character set 
    11611161                return val.encode('utf_16_be').encode('hex').upper() 
     1162            elif val is None: 
     1163                return '' 
    11621164            else: 
    11631165                return val 
     
    14641466 
    14651467        # HACK: duration (field 6) is unused in the extended format 
    1466         data[6] = '' 
     1468        data[6] = None 
    14671469 
    14681470        if isinstance(self.eventdt, datetime): 
     
    14801482        return data + [endtimestr, enddatestr, '', self.event_type, 
    14811483                       self.location, self.note, 501, self.repeat_every, 
    1482                        self.repeat_day, '', repeatendstr] 
     1484                       self.repeat_day, None, repeatendstr] 
    14831485 
    14841486    def to_xml(self):