Allow input from both yaml and json.

This commit is contained in:
Jeffrey Townsend
2018-01-11 20:58:53 +00:00
parent 04257bed1a
commit 9cd087dcb7

View File

@@ -48,7 +48,10 @@ if ops.inout:
g_data={}
if ops._in:
g_data = json.load(open(ops._in))
try:
g_data = yaml.load(open(ops._in))
except:
g_data = json.load(open(ops._in))
if ops.kj:
(k, j) = ops.kj