21 lines
520 B
Plaintext
21 lines
520 B
Plaintext
|
#!/usr/bin/env python
|
||
|
"""
|
||
|
Will compare 2 blueprints for equality!
|
||
|
On RHEL7/Python 2 toml uses dictionaries and
|
||
|
blueprint show doesn't keep the order of the elements.
|
||
|
|
||
|
For master/Python3 this is not the case.
|
||
|
"""
|
||
|
|
||
|
import sys
|
||
|
import pytoml
|
||
|
|
||
|
if len(sys.argv) != 3:
|
||
|
print("USAGE: ", __file__, "<blueprint-one.toml> <blueprint-two.toml>")
|
||
|
sys.exit(1)
|
||
|
|
||
|
blueprint_one = pytoml.loads(open(sys.argv[1]).read())
|
||
|
blueprint_two = pytoml.loads(open(sys.argv[2]).read())
|
||
|
|
||
|
assert blueprint_one == blueprint_two
|