]> granicus.if.org Git - python/commitdiff
more fun with string exceptions
authorBenjamin Peterson <benjamin@python.org>
Sun, 31 Oct 2010 18:13:04 +0000 (18:13 +0000)
committerBenjamin Peterson <benjamin@python.org>
Sun, 31 Oct 2010 18:13:04 +0000 (18:13 +0000)
Lib/xmlrpc/server.py

index eb231d3db497265374cb1dad5086a47ae58a561d..65f87d9541ad2b7ea49ed26d5a0e7d53149153a0 100644 (file)
@@ -67,7 +67,7 @@ class Math:
         elif method == 'add':
             return params[0] + params[1]
         else:
-            raise 'bad method'
+            raise ValueError('bad method')
 
 server = SimpleXMLRPCServer(("localhost", 8000))
 server.register_introspection_functions()