Reducing parameter bloat
Nicolas Sebrecht
nicolas.s-dev at laposte.net
Thu Sep 15 18:38:51 BST 2011
On Thu, Sep 15, 2011 at 07:36:30PM +0200, Nicolas Sebrecht wrote:
> On Thu, Sep 15, 2011 at 05:53:45PM +0200, Sebastian Spaeth wrote:
> > Another cleanup series. I have been annoyed by the number of parameters
> > that we pass in to the construction of the Folder(). Most of the
> > parameters we can calculate anyway, and some of them were set in all
> > backends in the same way, when doing it once in the BaseFolder would
> > suffice.
> >
> > I split the cleanup in a series of patches, removing one parameter at a
> > time. It is probably easier to review the series diff in one go, as all
> > patches touch mostly the same lines :).
> >
> > The series diff attached to this file, the full series as a reply. The
> > topic only saves 20 lines or so, but it reduces the number of parameters
> > that we pass around quite a bit too.
>
> Looks quiet nice. Thanks!
Hmm, it's a bit broken:
global name 'root' is not defined
ERROR: ERROR in syncfolder for dev.gmx folder Trash: Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/offlineimap/accounts.py", line 303, in syncfolder
statusrepos.getsep()))
File "/usr/lib64/python2.7/site-packages/offlineimap/repository/LocalStatus.py", line 85, in getfolder
return self.LocalStatusFolderClass(foldername, self)
File "/usr/lib64/python2.7/site-packages/offlineimap/folder/LocalStatusSQLite.py", line 50, in __init__
super(LocalStatusSQLiteFolder, self).__init__(name, repository)
File "/usr/lib64/python2.7/site-packages/offlineimap/folder/LocalStatus.py", line 32, in __init__
self.filename = os.path.join(root, self.getfolderbasename())
NameError: global name 'root' is not defined
--
Nicolas Sebrecht
More information about the OfflineIMAP-project
mailing list