[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: New upload of python-libgmail



On Tue, Jan 02, 2007 at 03:35:57PM -0800, Sebastien Delafond wrote:
> On the other hand, I just diffed the code between 0.1.5.1 and the CVS
> version as of today (which I packaged this morning), and it's "only"
> 58 lines (attached). If I had to guess, I'd say the last chunk is what
> fixes the problem at hand, but I'm not positive, since I don't have a
> test-case handy to try and reproduce this problem.

Attaching the diff will definitely help...

Cheers,

--Seb
--- 0.1.5/python-libgmail-0.1.5.1/debian/python-libgmail/usr/share/pycentral/python-libgmail/site-packages/libgmail.py	2006-09-28 13:56:37.000000000 -0700
+++ 0.1.5.1+cvs20070102/python-libgmail-0.1.5.1+cvs20070102/debian/python-libgmail/usr/share/pycentral/python-libgmail/site-packages/libgmail.py	2007-01-02 10:40:59.000000000 -0800
@@ -80,6 +80,11 @@
     '''
     pass
 
+class GmailSendError(Exception):
+    '''
+    Exception to throw if we're unable to send a message
+    '''
+    pass
 
 def _parsePage(pageContent):
     """
@@ -598,6 +603,8 @@
         if resultInfo[SM_SUCCESS]:
             result = GmailMessageStub(id = resultInfo[SM_NEWTHREADID],
                                       _account = self)
+        else:
+            raise GmailSendError, resultInfo[SM_MSG]
             
         return result
 
@@ -1216,6 +1223,9 @@
     Note: Because a message id can be used as a thread id this works for
           messages as well as threads.
     """
+    def __init__(self):
+        self._labels = None
+        
     def _makeLabelList(self, labelList):
         self._labels = labelList
     
@@ -1268,6 +1278,7 @@
     def __init__(self, parent, threadsInfo):
         """
         """
+        _LabelHandlerMixin.__init__(self)
         
         # TODO Handle this better?
         self._parent = parent
@@ -1387,6 +1398,7 @@
     def __init__(self, id = None, _account = None):
         """
         """
+        _LabelHandlerMixin.__init__(self)
         self.id = id
         self._account = _account
     
@@ -1416,7 +1428,7 @@
         self.sender = msgData[MI_AUTHOREMAIL]
         
         self.attachments = [GmailAttachment(self, attachmentInfo)
-                            for attachmentInfo in msgData[MI_ATTACHINFO]]
+                            for attachmentInfo in msgData[MI_ATTACHINFO-1]]
 
         # TODO: Populate additional fields & cache...(?)
 

Attachment: signature.asc
Description: Digital signature


Reply to: