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