X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=ovsdb%2Fovsdb-dot.in;h=3a9d9b0e862be1160480aaa060f65a5b7ea19bd5;hb=76ecc721793b29c8bae44b10a065ec9ac07a9e4b;hp=179353035d9f044231134d43f50c8ef9af5388e8;hpb=f8d739a9fa1c1223f0b2c88fd3f0ed47be69bf65;p=openvswitch diff --git a/ovsdb/ovsdb-dot.in b/ovsdb/ovsdb-dot.in index 17935303..3a9d9b0e 100755 --- a/ovsdb/ovsdb-dot.in +++ b/ovsdb/ovsdb-dot.in @@ -6,11 +6,6 @@ import os import re import sys -sys.path.insert(0, "@abs_top_srcdir@/ovsdb") -import simplejson as json - -from OVSDB import * - argv0 = sys.argv[0] def printEdge(tableName, baseType, label): @@ -25,7 +20,7 @@ def printEdge(tableName, baseType, label): ', '.join(['%s=%s' % (k,v) for k,v in options.items()])) def schemaToDot(schemaFile): - schema = DbSchema.fromJson(json.load(open(schemaFile, "r"))) + schema = DbSchema.fromJson(ovs.json.from_file(schemaFile)) print "digraph %s {" % schema.name for tableName, table in schema.tables.iteritems():