Hi Richard, according to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=378312, they're both using libgmail 0.1.4. I agree with you that the patch should work in either case, but I too hate to fix something whose cause I don't know :\
Cheers, --Seb n Mon, Jul 31, 2006 at 07:17:13AM +1000, Richard Jones wrote: > Hi, > > I'm currently not seeing it either, can you clarify what version of > libgmail they have installed? It seems they are seeing snippet > returned as a list and we are not. The patch looks like it will work > in either case but it would be nice to know what is causing the > different behaviours. > > Regards, > Richard. > > > On 7/28/06, Sebastien Delafond <[EMAIL PROTECTED]> wrote: > >tag 378312 + upstream > >thanks > > > >Hi Richard, > > > >do you have any thoughts on this ? I can't seem to reproduce this bug, > >but 2 of my Debian users are definitely seeing it, and Matthew seems > >to have narrowed it down quite a bit, and is even proposing a > >patch... The only thing that worries me here is that I am *not* > >experiencing this bug... What do you think ? > > > >Cheers, > > > >--Seb > > > >On Thu, Jul 27, 2006 at 05:11:39PM -0400, Matthew Cheetah Gabeler-Lee > >wrote: > >> On Thu, 27 Jul 2006, Sebastien Delafond wrote: > >> > >> > I still can't reproduce this one... Do you see the same behavior with > >> > another fsName ? > >> > >> I tried changing fsnames and mountpoints, which didn't change anything. > >> Finally, despite not really knowing python, I decided to dig into the > >> source and see if I could get anywhere, and I think I did ... > >> > >> > > Traceback (most recent call last): > >> > > File "/usr/share/gmailfs/gmailfs.py", line 701, in getdir > >> > > log.debug("thread.summary is " + thread.snippet) > >> > > TypeError: cannot concatenate 'str' and 'list' objects > >> > >> This exception is in a try/except block. So the exception gets logged, > >> and then the code continues. > >> > >> > > Traceback (most recent call last): > >> > > File "/usr/lib/python2.3/site-packages/fuse.py", line 40, in > >__call__ > >> > > return apply(self.func, args, kw) > >> > > File "/usr/share/gmailfs/gmailfs.py", line 725, in getdir > >> > > return map(lambda x: (x,0), lst) > >> > > TypeError: argument 2 to map() must support iteration > >> > >> Argument 2 is the lst variable, hmm. Well, the lst variable is > >> initialized to an empty list *after* the line on which the prior > >> exception occurred, so this second exception is probably happening > >> because lst, at that point, is whatever python's equivalent of > >> null/undef is, rather than being a list. > >> > >> Question: why does your version of python not bitch about this? From > >> what I can find on google, the refusal to concatenate strings and lists > >> is an inherent python behavior. Perhaps thread.snippet is coming out as > >> a different type of object for you. > >> > >> Anyways, more googling, it looks like the str() function is what we > >> need to convert the list to a string. Not really knowing what's going > >> on, however, I'm a bit worried that this may be masking some other > >> problem. However, a quick test with this patch was successful. > >> > >> --- gmailfs.py.old 2006-07-27 17:06:47.000000000 -0400 > >> +++ gmailfs.py.new 2006-07-27 17:06:22.000000000 -0400 > >> @@ -698,9 +698,9 @@ > >> for thread in folder: > >> assert len(thread) == 1 > >> for msg in thread: > >> - log.debug("thread.summary is " + thread.snippet) > >> + log.debug("thread.summary is " + str(thread.snippet)) > >> m = re.search(FileNameTag+'='+FileStartDelim+'(.*)'+ > >> - FileEndDelim, thread.snippet) > >> + FileEndDelim, str(thread.snippet)) > >> if (m): > >> # Match succeeded, we got the whole filename. > >> log.debug("Used summary for filename") > >> > >> > >> -- > >> -Cheetah > >> "Reality is that which, when you stop believing in it, doesn't go away". > >> -- Philip K. Dick > >> GPG pubkey fingerprint: A57F B354 FD30 A502 795B 9637 3EF1 3F22 A85E 2AD1 > >> > >> > > > > -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]