2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-30 22:05:19 +00:00

ovs.json: Use Exception, which exists, instead of Error, which doesn't.

Found by pychecker.
This commit is contained in:
Ben Pfaff
2011-08-24 17:04:20 -07:00
parent 7550c333d3
commit 6732237bee

View 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")