Menu

Fix for exception that can be raised

W Ross
2006-05-24
2013-05-21
  • W Ross

    W Ross - 2006-05-24

    On line 92 of libgmail.py:

    lines = pageContent.splitlines()

    if pageContent is None (as it can be if gmail does not respond correctly / network error etc) the library bails out with an AttributeError.
    This can be 'fixed' or at least made tidier to handle from other peoples programs by adding error handling code around this call:

    try:
        lines = pageContent.splitlines()
    except AttributeError:
        raise GmailError, 'Gmail failed to return required data.'

    Keep up the good work,
        stoical

     
    • Stas Zytkiewicz

      Stas Zytkiewicz - 2006-05-24

      Thanks, I will apply your patch.

      Regards,
      Stas Zytkiewicz (libgmail dev)

       

Log in to post a comment.

MongoDB Logo MongoDB