changeset 21038:ec9c30ce628d

Silence warnings from dbus-analyze-functions.py about calling 'raise' on a string (which is deprecated) by raising a stub exception instead.
author Will Thompson <will.thompson@collabora.co.uk>
date Sun, 28 Oct 2007 16:30:10 +0000
parents afb4704781ed
children 5af17c5a4a12
files libpurple/dbus-analyze-functions.py
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/dbus-analyze-functions.py	Sat Oct 27 17:47:48 2007 +0000
+++ b/libpurple/dbus-analyze-functions.py	Sun Oct 28 16:30:10 2007 +0000
@@ -75,7 +75,11 @@
 ]
 
 pointer = "#pointer#"
-myexception = "My Exception"
+
+class MyException(Exception):
+    pass
+
+myexception = MyException()
 
 def ctopascal(name):
     newname = ""
@@ -520,7 +524,7 @@
 
             try:
                 self.processfunction(functiontext, paramtexts)
-            except myexception:
+            except MyException:
                 sys.stderr.write(myline + "\n")
             except:
                 sys.stderr.write(myline + "\n")