Ticket #16376: 03-python-managesieve-starttls_fixup.patch

File 03-python-managesieve-starttls_fixup.patch, 715 bytes (added by gboyce@…, 16 years ago)

Patch to correct handling of STARTTLS support. Does not use starttls, but no longer dies on it.

  • managesieve.py

    ==== //sandbox/gboyce/sieve/python-managesieve-0.3/managesieve.py#9 - /Users/gboyce/perforce/sandbox/sieve/python-managesieve-0.3/managesieve.py ====
    old new  
    135135
    136136
    137137    def _parse_capabilities(self, lines):
     138        # XXX darky: seeing the STARTTLS cap makes managesieve barf
     139        # because 'data' (in the below unpack) has nothing to unpack.
     140        # Fix up lines for this.
     141        for pair in lines:
     142            if len(pair) == 1:
     143                pair.append("")
     144            assert len(pair) == 2
    138145        for typ, data in lines:
    139146            if __debug__:
    140147                if self.debug >= 3: