ovs.json: Use Exception, which exists, instead of Error, which doesn't.
authorBen Pfaff <blp@nicira.com>
Thu, 25 Aug 2011 00:04:20 +0000 (17:04 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 25 Aug 2011 18:07:23 +0000 (11:07 -0700)
Found by pychecker.

python/ovs/json.py

index 5e7d8fab9ed8adff45478a284b08379af0f95d7b..96f3cffc856b5fb8643a4ee0638a33e19becb370 100644 (file)
@@ -66,7 +66,7 @@ def to_stream(obj, stream, pretty=False, sort_keys=True):
             to_stream(value, stream, pretty, sort_keys)
         stream.write(u"]")
     else:
-        raise Error("can't serialize %s as JSON" % obj)
+        raise Exception("can't serialize %s as JSON" % obj)
 
 def to_file(obj, name, pretty=False, sort_keys=True):
     stream = open(name, "w")