On Fri, Jul 27, 2012 at 4:31 PM, DRS <[email protected]> wrote: > > It looks to me like deluge 1.3.5 has a pair of try/except bugs. IINM, the > second exception value (sans parentheses) gets overwritten by exception info > from the first, and the second is never caught. This is a relatively common > source of bugs in Python 2.x, and I believe this is why the syntax of > try/except changed in 3.x . > > HTH > > Diffs follow: > > Index: deluge/core/torrentmanager.py > =================================================================== > --- deluge/core/torrentmanager.py (revision 61847) > +++ deluge/core/torrentmanager.py (working copy) > @@ -595,7 +603,7 @@ > # Remove the torrent from deluge's session > try: > del self.torrents[torrent_id] > - except KeyError, ValueError: > + except (KeyError, ValueError): > return False > > # Save the session state > Index: deluge/ui/gtkui/torrentview.py > =================================================================== > --- deluge/ui/gtkui/torrentview.py (revision 61847) > +++ deluge/ui/gtkui/torrentview.py (working copy) > @@ -516,7 +516,7 @@ > return [] > > return torrent_ids > - except ValueError, TypeError: > + except (ValueError, TypeError): > return [] > > def get_torrent_status(self, torrent_id): >
This has been fixed in 1.3-stable. Thanks. -- You received this message because you are subscribed to the Google Groups "Deluge Dev" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/deluge-dev?hl=en.
