Edgewall Software

Ticket #5812: model.py.b.patch

File model.py.b.patch, 435 bytes (added by grafikrobot@…, 5 years ago)

Handle the AttributeError? exception, and assume string is not base64 encoded.

  • .py

    old new  
    8080        string""" 
    8181        try: 
    8282            return to_unicode(content.decode('base64')) 
    83         except (UnicodeEncodeError, binascii.Error): 
     83        except (UnicodeEncodeError, binascii.Error, AttributeError): 
    8484            # cope with legacy content (stored before base64 encoding) 
    8585            return to_unicode(content) 
    8686