[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Packages whith “except” overwriting builtins



You might be easily mislead into thinking that this code

   try:
      eggs()
   except IOError, OSError:
      pass

will catch both IOError and OSError exceptions. In fact, it will not, as it is more or less equivalent to:

   try:
      eggs()
   except IOError, ex:
      OSError = ex  # Whoo, overwrite the built-in name

There are about 50 packages in the archive whose developers make this kind of mistake. I have attached log file and dd-list. I'm not willing to do MBF, but if someone else is, please feel free to use my data.

--
Jakub Wilk
Adam Cécile (Le_Vert) <gandalf@le-vert.net>
   hellanzb

Tim Abbott <tabbott@mit.edu>
   sagemath

Rahul Amaram <rahul@amaram.name>
   python-twisted-calendarserver
   python-twisted-calendarserver (U)

David Andel <andel@ailab.ch>
   uligo

Kumar Appaiah <akumar@ee.iitm.ac.in>
   harvestman (U)

Luciano Bello <luciano@debian.org>
   w3af-console

Bastian Blank <waldi@debian.org>
   xen-utils-4.0 (U)

Andreas Bombe <aeb@debian.org>
   anki

Joachim Breitner <nomeata@debian.org>
   fso-frameworkd (U)

Luca Bruno <lucab@debian.org>
   uzbl (U)

Calendarserver Maintainers <calendarserver-maintainers@lists.alioth.debian.org>
   python-vobject

Luca Capello <luca@pca.it>
   fso-frameworkd (U)

Sargis Dallakyan <sargis@scripps.edu>
   mgltools-molkit (U)

Julien Danjou <acid@debian.org>
   mbot
   xen-utils-4.0 (U)

Debian freesmartphone.org Team <pkg-fso-maint@lists.alioth.debian.org>
   fso-frameworkd

Debian Multimedia Maintainers <pkg-multimedia-maintainers@lists.alioth.debian.org>
   idjc

Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>
   python-apptools
   python-enable
   python-nose (U)

Debian Xen Team <pkg-xen-devel@lists.alioth.debian.org>
   xen-utils-4.0

Debian-Med Packaging Team <debian-med-packaging@lists.alioth.debian.org>
   mgltools-molkit

Sebastian Dröge <slomo@debian.org>
   pitivi (U)

Free Ekanayaka <freee@debian.org>
   idjc (U)
   python-twisted-core (U)

Alexandre Fayolle <afayolle@debian.org>
   spambayes

Devid Antonio Filoni <d.filoni@ubuntu.com>
   emesene (U)

Morten Werner Forsbring <werner@debian.org>
   python-sss (U)

Freevo Debian Dream Team <pkg-freevo-maint@lists.alioth.debian.org>
   python-freevo

Cristian Greco <cristian@regolo.cc>
   deluge-common
   deluge-gtk

Guido Günther <agx@sigxcpu.org>
   python-vobject (U)

Wen Heping <wenheping@gmail.com>
   python-tables

Varun Hiremath <varun@debian.org>
   python-apptools (U)
   python-enable (U)

Philipp Huebner <debalance@debian.org>
   anyremote2html
   ganyremote
   kanyremote

Philipp Kern <pkern@debian.org>
   python-pydhcplib

Julian Andres Klode <jak@debian.org>
   python-aptdaemon

Matthias Klose <doko@debian.org>
   python-twisted-core
   qmtest

Ondřej Kuzník <ondra@mistotebe.net>
   quodlibet-plugins (U)

Chris Lamb <lamby@debian.org>
   python-django-treebeard
   rst2pdf

Chris Lawrence <lawrencc@debian.org>
   python-reportbug (U)

Thomas Leonard <talex5@gmail.com>
   zeroinstall-injector

Georg W. Leonhardt <leonhardt@geole.info>
   python-freevo (U)

Maintainers of GStreamer packages <pkg-gstreamer-maintainers@lists.alioth.debian.org>
   moovida-plugins-ugly

Torsten Marek <shlomme@debian.org>
   python-nose (U)

A Mennucc1 <mennucc1@debian.org>
   python-freevo (U)

Loic Minier <lool@dooz.org>
   moovida-plugins-ugly (U)
   pitivi

Steffen Moeller <moeller@debian.org>
   mgltools-molkit (U)

Emilio Pozuelo Monfort <pochu@debian.org>
   emesene

Sam Morris <sam@robots.org.uk>
   pymsnt

Toni Mueller <toni@debian.org>
   roundup

Xavier Oswald <xoswald@debian.org>
   magicor

Anand Pillai <abpillai@gmail.com>
   harvestman (U)

Python Applications Packaging Team <python-apps-team@lists.alioth.debian.org>
   emesene (U)
   harvestman
   pyaimt (U)
   pyicqt (U)
   scribes (U)

Arnaud Quette <aquette@debian.org>
   moovida-plugins-ugly (U)

Petter Reinholdtsen <pere@debian.org>
   python-sss

Reportbug Maintainers <reportbug-maint@lists.alioth.debian.org>
   python-reportbug

Patrick Ringl <patrick_@freenet.de>
   pyicqt (U)

Stefan Ritter <xeno@thehappy.de>
   uzbl

Miriam Ruiz <little_miry@yahoo.es>
   treeline

Filippo Rusconi <rusconi-debian@laposte.net>
   mmass (U)

Chris Silva <racerx@makeworld.com>
   scribes

Gustavo Noronha Silva <kov@debian.org>
   python-nose

Jonas Smedegaard <dr@jones.dk>
   python-swap

Jose Carlos Garcia Sogo <jsogo@debian.org>
   conduit

Christine Spang <christine@debian.org>
   quodlibet-plugins

Reinhard Tartler <siretart@tauware.de>
   idjc (U)

The Debichem Group <debichem-devel@lists.alioth.debian.org>
   mmass

Paul van Tilburg <paulvt@debian.org>
   moovida-plugins-ugly (U)

Sandro Tosi <morph@debian.org>
   python-reportbug (U)

Alessio Treglia <alessio@debian.org>
   idjc (U)

Guido Trotter <ultrotter@debian.org>
   xen-utils-4.0 (U)

Daiki Ueno <ueno@unixuser.org>
   ibus-skk

Julien Valroff <julien@kirya.net>
   ajaxterm

Frederic Wagner <wagnerf@imag.fr>
   magicor (U)

Erik Wenzel <erik@debian.org>
   dynagen
   gns3

Jonathan Wiltshire <debian@jwiltshire.org.uk>
   rednotebook

Michal Čihař <nijel@debian.org>
   pyaimt
   pyicqt

ajaxterm_0.10-6 IOError /usr/share/ajaxterm/qweb.py:855
ajaxterm_0.10-6 IOError /usr/share/ajaxterm/qweb.py:872
anki_0.9.9.8.6-2.1 OSError /usr/share/anki/anki/sync.py:1166
anyremote2html_1.3-1 NameError /usr/bin/anyremote2html:371
conduit_0.3.17-1 TypeError /usr/share/pyshared/conduit/SyncSet.py:213
deluge-common_1.2.3+git20100712.0b609bf-1 ValueError /usr/share/pyshared/deluge/core/torrentmanager.py:542
deluge-gtk_1.2.3+git20100712.0b609bf-1 TypeError /usr/share/pyshared/deluge/ui/gtkui/torrentview.py:448
dynagen_0.11.0-5 AttributeError /usr/share/pyshared/confConsole.py:922
emesene_1.6.3-1 TypeError /usr/share/emesene/plugins_base/NotifyOsdImproved.py:453
fso-frameworkd_0.8.5.1-1 IOError /usr/share/pyshared/framework/subsystems/ogsmd/helpers.py:151
ganyremote_5.11.5-1 NameError /usr/bin/ganyremote:542
ganyremote_5.11.5-1 NameError /usr/bin/ganyremote:923
ganyremote_5.11.5-1 NameError /usr/bin/ganyremote:1091
ganyremote_5.11.5-1 NameError /usr/bin/ganyremote:1706
ganyremote_5.11.5-1 AttributeError /usr/bin/ganyremote:2350
ganyremote_5.11.5-1 AttributeError /usr/bin/ganyremote:2394
ganyremote_5.11.5-1 NameError /usr/bin/ganyremote:3649
ganyremote_5.11.5-1 NameError /usr/bin/ganyremote:3656
ganyremote_5.11.5-1 NameError /usr/bin/ganyremote:3735
ganyremote_5.11.5-1 AttributeError /usr/bin/ganyremote:3744
ganyremote_5.11.5-1 NameError /usr/bin/ganyremote:4276
ganyremote_5.11.5-1 NameError /usr/bin/ganyremote:4389
ganyremote_5.11.5-1 NameError /usr/bin/ganyremote:4396
ganyremote_5.11.5-1 NameError /usr/bin/ganyremote:4419
ganyremote_5.11.5-1 NameError /usr/bin/ganyremote:4430
ganyremote_5.11.5-1 NameError /usr/bin/ganyremote:4440
ganyremote_5.11.5-1 NameError /usr/bin/ganyremote:4450
gns3_0.7.2-1 AttributeError /usr/share/pyshared/GNS3/Dynagen/confConsole.py:952
harvestman_2.0~alpha20022008-2 TypeError /usr/share/pyshared/harvestman/lib/urlqueue.py:675
harvestman_2.0~alpha20022008-2 TypeError /usr/share/pyshared/harvestman/lib/urlqueue.py:686
hellanzb_0.13-6.1 ValueError /usr/share/pyshared/Hellanzb/NewzbinDownloader.py:135
ibus-skk_0.0.9-1 AssertionError /usr/share/ibus-skk/engine/skk.py:722
ibus-skk_0.0.9-1 UnicodeDecodeError /usr/share/ibus-skk/engine/skk.py:1332
idjc_0.8.3-1 IOError /usr/share/pyshared/idjcgui.py:1892
idjc_0.8.3-1 TypeError /usr/share/pyshared/idjc/IDJCfree.py:65
kanyremote_5.11.7-1 NameError /usr/bin/kanyremote:1282
kanyremote_5.11.7-1 NameError /usr/bin/kanyremote:1366
kanyremote_5.11.7-1 NameError /usr/bin/kanyremote:1505
kanyremote_5.11.7-1 NameError /usr/bin/kanyremote:1735
kanyremote_5.11.7-1 KeyError /usr/bin/kanyremote:2821
kanyremote_5.11.7-1 NameError /usr/bin/kanyremote:2968
kanyremote_5.11.7-1 NameError /usr/bin/kanyremote:3255
kanyremote_5.11.7-1 NameError /usr/bin/kanyremote:3271
kanyremote_5.11.7-1 NameError /usr/bin/kanyremote:3907
kanyremote_5.11.7-1 NameError /usr/bin/kanyremote:3920
kanyremote_5.11.7-1 NameError /usr/bin/kanyremote:3933
kanyremote_5.11.7-1 NameError /usr/bin/kanyremote:3995
kanyremote_5.11.7-1 NameError /usr/bin/kanyremote:4029
magicor_1.1-3 IndexError /usr/share/pyshared/magicor/sprites/stones.py:35
mbot_0.3-7 SyntaxError /usr/share/mbot/modules/NewsHandler.py:47
mgltools-molkit_1.5.4.cvs.20090603-1.1 IndexError /usr/share/pyshared/MolKit/pdb2pqr/pdb.py:369
mgltools-molkit_1.5.4.cvs.20090603-1.1 IndexError /usr/share/pyshared/MolKit/pdb2pqr/pdb.py:496
mgltools-molkit_1.5.4.cvs.20090603-1.1 NameError /usr/share/pyshared/MolKit/pdb2pqr/src/protein.py:188
mgltools-molkit_1.5.4.cvs.20090603-1.1 IndexError /usr/share/pyshared/MolKit/pdb2pqr/src/pdb.py:417
mgltools-molkit_1.5.4.cvs.20090603-1.1 IndexError /usr/share/pyshared/MolKit/pdb2pqr/src/pdb.py:685
mmass_2.4.0-4 TypeError /usr/share/mmass/modules/mimport/document_mmass.py:266
moovida-plugins-ugly_1.0.9+bzr1614-1 AttributeError /usr/share/pyshared/elisa/plugins/youtube/resource_provider.py:152
moovida-plugins-ugly_1.0.9+bzr1614-1 AttributeError /usr/share/pyshared/elisa/plugins/youtube/resource_provider.py:162
pitivi_0.13.4-3 OSError /usr/lib/pitivi/python/pitivi/settings.py:212
pyaimt_0.8.0.1-2 TypeError /usr/share/pyaimt/src/register.py:153
pyaimt_0.8.0.1-2 TypeError /usr/share/pyaimt/src/register.py:232
pyaimt_0.8.0.1-2 UnicodeDecodeError /usr/share/pyaimt/src/xdb/xmlfiles.py:352
pyicqt_0.8.1.5-3 TypeError /usr/share/pyicqt/src/register.py:153
pyicqt_0.8.1.5-3 TypeError /usr/share/pyicqt/src/register.py:232
pyicqt_0.8.1.5-3 UnicodeDecodeError /usr/share/pyicqt/src/xdb/xmlfiles.py:448
pymsnt_0.11.3-5 TypeError /usr/share/pymsnt/src/register.py:126
python-apptools_3.3.2-1 NotImplementedError /usr/share/doc/python-apptools/examples/permissions/server/server.py:549
python-aptdaemon_0.31+bzr413-1 IndexError /usr/share/pyshared/aptdaemon/progress.py:504
python-django-treebeard_1.61-1 KeyError /usr/share/pyshared/treebeard/models.py:558
python-enable_3.3.1-1 SystemExit /usr/share/pyshared/enthought/enable/toolkit.py:39
python-enable_3.3.1-1 SystemExit /usr/share/pyshared/enthought/savage/traits/ui/toolkit.py:34
python-freevo_1.9.0-4 SystemExit /usr/share/pyshared/freevo/helpers/passwd.py:43
python-nose_0.11.1-1 SystemExit /usr/share/pyshared/nose/plugins/multiprocess.py:493
python-pydhcplib_0.6.2-2 TypeError /usr/share/pyshared/pydhcplib/dhcp_packet.py:146
python-reportbug_4.12.4 OSError /usr/share/pyshared/reportbug/utils.py:864
python-sss_1.2.1-1 KeyError /usr/share/pyshared/SSSDConfig.py:289
python-sss_1.2.1-1 KeyError /usr/share/pyshared/SSSDConfig.py:308
python-sss_1.2.1-1 KeyError /usr/share/pyshared/SSSDConfig.py:323
python-swap_1.2.1-4.1 AssertionError /usr/share/pyshared/swap/cwm_time.py:44
python-tables_2.1.2-3+b1 AttributeError /usr/share/pyshared/tables/nra/nestedrecords.py:694
python-twisted-calendarserver_0.2.0.svn19773-5+b2 AttributeError /usr/share/pyshared/twisted/internet/gtkreactor.py:28
python-twisted-calendarserver_0.2.0.svn19773-5+b2 ValueError /usr/share/pyshared/twisted/words/protocols/jabber/xmlstream.py:534
python-twisted-calendarserver_8.2.0.svn27622-1 AttributeError /usr/lib/twisted-calendarserver/lib/python2.6/site-packages/twisted/internet/gtkreactor.py:22
python-twisted-calendarserver_8.2.0.svn27622-1 AttributeError /usr/lib/twisted-calendarserver/lib/python2.5/site-packages/twisted/internet/gtkreactor.py:22
python-twisted-core_10.1.0-2 AttributeError /usr/lib/python2.6/dist-packages/twisted/internet/gtkreactor.py:22
python-twisted-core_10.1.0-2 AttributeError /usr/lib/python2.5/site-packages/twisted/internet/gtkreactor.py:22
python-twisted-core_10.1.0-2 AttributeError /usr/share/pyshared/twisted/internet/gtkreactor.py:22
python-vobject_0.8.1c-3 KeyError /usr/share/pyshared/vobject/icalendar.py:391
python-vobject_0.8.1c-3 KeyError /usr/share/pyshared/vobject/icalendar.py:399
python-vobject_0.8.1c-3 KeyError /usr/share/pyshared/vobject/icalendar.py:473
qmtest_2.4.1-1 AttributeError /usr/share/pyshared/qm/external/DocumentTemplate/pDocumentTemplate.py:93
qmtest_2.4.1-1 KeyError /usr/share/pyshared/qm/external/DocumentTemplate/DT_In.py:701
qmtest_2.4.1-1 KeyError /usr/share/pyshared/qm/external/DocumentTemplate/DT_In.py:710
quodlibet-plugins_1:2.2.1-1 IOError /usr/share/pyshared/quodlibet/plugins/songsmenu/albumart.py:1116
rednotebook_1.0.0-2 UnicodeEncodeError /usr/share/rednotebook/rednotebook/util/unicode.py:69
roundup_1.4.13-3.1 TypeError /usr/share/pyshared/roundup/hyperdb.py:1104
roundup_1.4.13-3.1 TypeError /usr/share/pyshared/roundup/anypy/sets_.py:27
rst2pdf_0.14.2-1 UnicodeEncodeError /usr/share/pyshared/rst2pdf/pdfbuilder.py:781
sagemath_3.0.5dfsg-5.1+b1 ValueError /usr/lib/sagemath/devel/sage-main/sage/server/simple/twist.py:176
sagemath_3.0.5dfsg-5.1+b1 ValueError /usr/lib/sagemath/devel/sage-main/sage/server/simple/twist.py:283
sagemath_3.0.5dfsg-5.1+b1 KeyboardInterrupt /usr/lib/sagemath/devel/sage-main/sage/schemes/elliptic_curves/ell_padic.py:71
sagemath_3.0.5dfsg-5.1+b1 AttributeError /usr/lib/sagemath/devel/sage-main/sage/schemes/elliptic_curves/sha.py:152
sagemath_3.0.5dfsg-5.1+b1 KeyboardInterrupt /usr/lib/sagemath/devel/sage-main/sage/schemes/elliptic_curves/padic_height.py:51
sagemath_3.0.5dfsg-5.1+b1 ValueError /usr/lib/sagemath/devel/sage-main/sage/rings/coerce_python.py:54
sagemath_3.0.5dfsg-5.1+b1 ValueError /usr/lib/sagemath/devel/sage-main/sage/rings/coerce_python.py:58
sagemath_3.0.5dfsg-5.1+b1 OSError /usr/lib/sagemath/devel/sage-main/sage/misc/interpreter.py:316
sagemath_3.0.5dfsg-5.1+b1 OSError /usr/lib/sagemath/devel/sage-main/sage/misc/interpreter.py:322
sagemath_3.0.5dfsg-5.1+b1 OSError /usr/lib/sagemath/devel/sage-main/sage/misc/interpreter.py:328
sagemath_3.0.5dfsg-5.1+b1 OSError /usr/lib/sagemath/devel/sage-main/sage/misc/preparser.py:928
sagemath_3.0.5dfsg-5.1+b1 ValueError /usr/share/pyshared/sage/server/simple/twist.py:176
sagemath_3.0.5dfsg-5.1+b1 ValueError /usr/share/pyshared/sage/server/simple/twist.py:283
sagemath_3.0.5dfsg-5.1+b1 KeyboardInterrupt /usr/share/pyshared/sage/schemes/elliptic_curves/ell_padic.py:71
sagemath_3.0.5dfsg-5.1+b1 AttributeError /usr/share/pyshared/sage/schemes/elliptic_curves/sha.py:152
sagemath_3.0.5dfsg-5.1+b1 KeyboardInterrupt /usr/share/pyshared/sage/schemes/elliptic_curves/padic_height.py:51
sagemath_3.0.5dfsg-5.1+b1 ValueError /usr/share/pyshared/sage/rings/coerce_python.py:54
sagemath_3.0.5dfsg-5.1+b1 ValueError /usr/share/pyshared/sage/rings/coerce_python.py:58
sagemath_3.0.5dfsg-5.1+b1 OSError /usr/share/pyshared/sage/misc/interpreter.py:316
sagemath_3.0.5dfsg-5.1+b1 OSError /usr/share/pyshared/sage/misc/interpreter.py:322
sagemath_3.0.5dfsg-5.1+b1 OSError /usr/share/pyshared/sage/misc/interpreter.py:328
sagemath_3.0.5dfsg-5.1+b1 OSError /usr/share/pyshared/sage/misc/preparser.py:928
scribes_0.4~r543-2 IOError /usr/share/pyshared/SCRIBES/PluginInitializer/HomePluginPathCreator.py:33
spambayes_1.0.4-5.1 ValueError /usr/share/pyshared/spambayes/classifier.py:614
spambayes_1.0.4-5.1 ValueError /usr/share/pyshared/spambayes/classifier.py:633
treeline_1.2.4-1 AttributeError /usr/share/treeline/p3.py:39
uligo_0.3-6 OSError /usr/games/uligo:307
uligo_0.3-6 OSError /usr/share/games/uligo/uligo.py:307
uzbl_0.0.0~git.20100403-2 ValueError /usr/bin/uzbl-event-manager:247
uzbl_0.0.0~git.20100403-2 ValueError /usr/share/uzbl/examples/data/scripts/uzbl-event-manager:247
w3af-console_1.0-rc3svn3489-1 SystemExit /usr/share/w3af/extlib/nltk/internals.py:486
w3af-console_1.0-rc3svn3489-1 KeyboardInterrupt /usr/share/w3af/extlib/nltk/classify/weka.py:67
xen-utils-4.0_4.0.1~rc3-1 TypeError /usr/lib/xen-4.0/lib/python/xen/sv/Wizard.py:217
zeroinstall-injector_0.49-1 ValueError /usr/share/pyshared/zeroinstall/0launch-gui/properties.py:77

Attachment: signature.asc
Description: Digital signature


Reply to: