Complete.Org: Mailing Lists: Archives: offlineimap: December 2008:
[PATCH] Fix md5 import error
Home

[PATCH] Fix md5 import error

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: offlineimap@xxxxxxxxxxxx
Subject: [PATCH] Fix md5 import error
From: Paul Hinze <paul.t.hinze@xxxxxxxxx>
Date: Mon, 22 Dec 2008 19:16:18 -0600

I just upgraded to the latest git master version of offlineimap and I
ran into the following error when trying to sync:
> Thread 'Folder sync gmail[All Mail]' terminated with exception:
> Traceback (most recent call last):
>   File "/usr/lib/python2.5/site-packages/offlineimap/threadutil.py", line 
> 149, in run
>     Thread.run(self)
>   File "/usr/lib/python2.5/threading.py", line 446, in run
>     self.__target(*self.__args, **self.__kwargs)
>   File "/usr/lib/python2.5/site-packages/offlineimap/accounts.py", line 300, 
> in syncfolder
>     localfolder.cachemessagelist()
>   File "/usr/lib/python2.5/site-packages/offlineimap/folder/Maildir.py", line 
> 134, in cachemessagelist
>     self.messagelist = self._scanfolder()
>   File "/usr/lib/python2.5/site-packages/offlineimap/folder/Maildir.py", line 
> 87, in _scanfolder
>     foldermd5 = md5.new(self.getvisiblename()).hexdigest()
> AttributeError: 'builtin_function_or_method' object has no attribute 'new'

I did a bit of debugging and asking around in #python and it turns out
that because Maildir.py uses a conditional import of md5 from either
hashlib or the md5 module, the md5.new() call is not always correct.
The attached patch should fix this problem.

Cheers,

Paul

-- 
{ 
  :name => 'Paul Hinze',
  :mail => 'paul.t.hinze@xxxxxxxxx',
  :www  => 'http://phinze.com',
  :irc  => 'phinze'
}


-- Binary/unsupported file stripped by Ecartis --
-- Type: text/x-diff




[Prev in Thread] Current Thread [Next in Thread]