[Zope3-dev] Re: Bare excepts in z3c.zalchemy
Philipp von Weitershausen
philipp at weitershausen.de
Sat Mar 3 09:01:48 EST 2007
Jürgen Kartnaller wrote:
> datamanager.py: 2 try/except
> They are there because it is possible that a table already exists when
> trying to create it or doesn't exist when trying to delete it.
> As I remember when I wrote this I couldn't find a better way, but I'm
> there is a better way in the latest version of sqlalchemy.
Good to know.
> container.py: 2 try/except
> get speaks for itself, it think!
Yes, those aren't bare excepts. Those make sense to me :)
> __len__ contains it to be able to view the container even if there is no
> database connection. Otherwise if the database connection is lost you
> even can not view the container in zmi.
>
> So tons == 4 :)
Okay, okay, I was exaggerating :). But there are some bare excepts in
the tests as well:
$ grep -nH -rI except: *
datamanager.py:153: except:
datamanager.py:162: except:
testing/__init__.py:31: except:
tests/test_zalchemy.py:35: except:
tests/test_zalchemy.py:39: except:
tests/test_zalchemy.py:43: except:
Best,
Philipp
--
http://worldcookery.com -- Professional Zope documentation and training
Next Zope 3 training at Camp5: http://trizpug.org/boot-camp/camp5
More information about the Zope3-dev
mailing list