c807245d8b
Trivial updates to print statements only Change-Id: I633c21a226364d045fc1650cb41b79b83988d7db
25 lines
509 B
Python
25 lines
509 B
Python
#!/usr/bin/env python
|
|
|
|
import sys
|
|
import difflib
|
|
|
|
|
|
def assert_sorted(lines):
|
|
if lines == sorted(lines):
|
|
return True
|
|
else:
|
|
print("Modules not sorted:")
|
|
for line in difflib.context_diff(lines, sorted(lines)):
|
|
print(line)
|
|
sys.exit(1)
|
|
|
|
|
|
with open(sys.argv[1]) as f:
|
|
lines = f.readlines()
|
|
|
|
integration = [i for i in lines if i.startswith('INTEGRATION')]
|
|
source = [i for i in lines if i.startswith('SOURCE')]
|
|
|
|
assert_sorted(integration)
|
|
assert_sorted(source)
|