# HG changeset patch # User Ari Pollak # Date 1290897409 0 # Node ID d63748b78769d57c83681f4f0d5539c69adef89f # Parent 72e6fa6caecc88255a3142db3adc89760d12be0f Fix purple-remote on Python 2.6+. Use Exception objects instead of string exceptions, which are no longer supported on 2.6+. Fixes #12151. committer: Elliott Sales de Andrade diff -r 72e6fa6caecc -r d63748b78769 ChangeLog --- a/ChangeLog Sat Nov 27 07:56:27 2010 +0000 +++ b/ChangeLog Sat Nov 27 22:36:49 2010 +0000 @@ -1,6 +1,10 @@ Pidgin and Finch: The Pimpin' Penguin IM Clients That're Good for the Soul version 2.7.8 (??/??/????): + General: + * Fix the exceptions in purple-remote on Python 2.6+. (Ari Pollak) + (#12151) + MSN: * Don't show ourselves in the list of endpoints that can be disconnected. diff -r 72e6fa6caecc -r d63748b78769 libpurple/purple-remote --- a/libpurple/purple-remote Sat Nov 27 07:56:27 2010 +0000 +++ b/libpurple/purple-remote Sat Nov 27 22:36:49 2010 +0000 @@ -36,7 +36,8 @@ def __call__(self, *args): result = self.cobj.obj.__getattr__(self.attr)(*args) if result == 0: - raise "Error: " + self.attr + " " + str(args) + " returned " + str(result) + raise Exception("Error: %s %s returned %s" % + (self.attr, args, result)) return result def show_help(requested=False): @@ -223,7 +224,7 @@ elif type == "i": methodparams.append(int(value)) else: - raise "Don't know how to handle type \"%s\"" % type + raise Exception("Don't know how to handle type \"%s\"" % type) return purple.__getattr__(command)(*methodparams) show_help()