From 7cdedbea1f71cd931115110b4428f7c3a3f87ac9 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Wed, 3 Sep 2014 15:49:03 +0100 Subject: [PATCH] [Python-Modernize] libmodernize.fixes.fix_raise --- deluge/ui/Win32IconImagePlugin.py | 2 +- deluge/ui/tracker_icons.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/deluge/ui/Win32IconImagePlugin.py b/deluge/ui/Win32IconImagePlugin.py index 38c302c0a..3f6c77119 100644 --- a/deluge/ui/Win32IconImagePlugin.py +++ b/deluge/ui/Win32IconImagePlugin.py @@ -72,7 +72,7 @@ class Win32IcoFile (object): header = struct.unpack('<3H', buf.read(6)) if (0, 1) != header[:2]: - raise SyntaxError, 'not an ico file' + raise SyntaxError('not an ico file') self.nb_items = header[2] diff --git a/deluge/ui/tracker_icons.py b/deluge/ui/tracker_icons.py index 24f61aece..f47d4f7f7 100644 --- a/deluge/ui/tracker_icons.py +++ b/deluge/ui/tracker_icons.py @@ -364,7 +364,7 @@ class TrackerIcons(Component): :rtype: Deferred """ if len(icons) == 0: - raise NoIconsError, "empty icons list" + raise NoIconsError("empty icons list") (url, mimetype) = icons.pop(0) d = download_file(url, os.path.join(self.dir, host_to_icon_name(host, mimetype)), force_filename=True) @@ -392,7 +392,7 @@ class TrackerIcons(Component): raise InvalidIconError(ex) else: if os.stat(icon_name).st_size == 0L: - raise InvalidIconError, "empty icon" + raise InvalidIconError("empty icon") return icon_name