-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thu 26 Apr 2012 06:00:39 PM IST, Gonzalo Odiard wrote: > > > > On Thu, Apr 26, 2012 at 9:10 AM, Manuel Kaufmann <[email protected] > <mailto:[email protected]>> wrote: > > On Thu, Apr 26, 2012 at 09:06, <[email protected] > <mailto:[email protected]>> wrote: > > + except: > > + pass > > + > > I think you should avoid "except:" catching all the exception possible > there. Instead of this you should use "except ImportError:" in this > case. > > > May be. Anyway, If there are _any_ problem with the item creation, I > prefer have the activity working without the button, to crash the > activity. >
I disagree :-) We should catch problems we think would happen, like ImportError in this case. Catching ramdom exceptions will hide problems, which might get harder to debug in the future. Also some other comments: * Please mention the component name (to which the patch applies) in the subject. Use the --subject-prefix switch with git-send-email for this. For eg: --subject-prefix="PATCH Chat" * Maybe have a logging.warning or logging.exception in the except block. > > Gonzalo > > > _______________________________________________ > Sugar-devel mailing list > [email protected] > http://lists.sugarlabs.org/listinfo/sugar-devel - -- Anish Mangal Sugar Labs -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJPmUV4AAoJEBoxUdDHDZVp1Y8IAJR7dc5oDFtOHD71G/LMjpLP 7L4ABCAHiCkImVSHAt4P9MsRRyOT1xQ6ado0M/z2V30Yw3SOmU6YC4VzdmDJ5qFs 8lOnGkRu/GoTLan5U5z3ON1Ki8uCTRBIGvG7mEyZfuf9MT+OdIszB27Ofi3IC9e0 X8KmUF0ECm2h1MPo7xkpFrQ0Of5qZ4YLNjP9Fv0HKP90Tc+Z8RUmfZLmBW77X72Q U+D/gdnGxrqo5GNNIntlJnjWjVvWvPrMrlLIoMOjQ/6Ga2sPa4GQEu0cLx1heyAu w09SXnX4JTQhlg4wRq0R/NHoGSBzUg3TDpohbCHU13KptimxuupxzOPdIrcdq6o= =MpIj -----END PGP SIGNATURE----- _______________________________________________ Sugar-devel mailing list [email protected] http://lists.sugarlabs.org/listinfo/sugar-devel

