[Checkins] Re: SVN: Products.Five/branches/1.4/pythonproducts.py Don't fret if the app connection is attached to an ongoing session.

Philipp von Weitershausen philipp at weitershausen.de
Tue Aug 21 14:57:37 EDT 2007


Bare "except:" alarm!
(And missing tests)


Rocky Burt wrote:
> Log message for revision 79082:
>   Don't fret if the app connection is attached to an ongoing session.
>   
> 
> Changed:
>   U   Products.Five/branches/1.4/pythonproducts.py
> 
> -=-
> Modified: Products.Five/branches/1.4/pythonproducts.py
> ===================================================================
> --- Products.Five/branches/1.4/pythonproducts.py	2007-08-21 17:12:01 UTC (rev 79081)
> +++ Products.Five/branches/1.4/pythonproducts.py	2007-08-21 17:20:36 UTC (rev 79082)
> @@ -96,8 +96,12 @@
>              elif old_product_packages.has_key(product_id):
>                  packages[product_id] = old_product_packages[product_id]
>      finally:
> -        app._p_jar.close()
> -    
> +        try:
> +            app._p_jar.close()
> +        except:
> +            # don't fret if the app connection is attached to an ongoing session
> +            pass
> +
>      return packages
>      
>  def patch_ProductDispatcher__bobo_traverse__():


-- 
http://worldcookery.com -- Professional Zope documentation and training


More information about the Checkins mailing list