Uwe Grauer wrote:
> dabo Commit
> Revision 4222
> Date: 2008-07-02 11:54:51 -0700 (Wed, 02 Jul 2008)
> Author: Uwe_Grauer
> Trac: http://svn.dabodev.com/trac/dabo/changeset/4222
> 
> Changed:
> U   trunk/dabo/dApp.py
> 
> Log:
> Fixed error in dApp.closeConnections()
> 
> 
> Diff:
> Modified: trunk/dabo/dApp.py
> ===================================================================
> --- trunk/dabo/dApp.py        2008-07-02 18:39:21 UTC (rev 4221)
> +++ trunk/dabo/dApp.py        2008-07-02 18:54:51 UTC (rev 4222)
> @@ -890,7 +890,7 @@
>               """Cleanup as the app is exiting."""
>               for conn in self.dbConnections:
>                       try:
> -                             conn.close()
> +                             self.dbConnections[conn].close()
>                       except StandardError, e:
>                               dabo.errorLog.write(_("Failed to close 
> connection. Error: %s") % e)

Oh, wait a second. I see the difference now. conn is the key, not the 
connection. That should be rewritten to:

for key, conn in self.dbConnections.items():
   conn.close()
   del self.dbConnections[key]

No except clause needed because we'd want to see the traceback - any 
problem we have here would be unexpected.

Paul


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]

Reply via email to