except ImportError as e:
shlex_join = e
-try:
- from shlex import quote as shlex_quote
-except ImportError as e:
- shlex_quote = e
-
class NoCommand(Exception):
pass
interface = programlisting.get('interface')
argv = [f'{arguments.build_dir}/{executable}', f'--bus-introspect={interface}']
- if isinstance(shlex_join, Exception):
- print(f'COMMAND: {" ".join(shlex_quote(arg) for arg in argv)}')
- else:
- print(f'COMMAND: {shlex_join(argv)}')
+ print(f'COMMAND: {shlex_join(argv)}')
try:
out = subprocess.check_output(argv, universal_newlines=True)
global arguments
arguments = parse_args()
- for item in (etree, shlex_quote):
+ for item in (etree, shlex_join):
if isinstance(item, Exception):
print(item, file=sys.stderr)
sys.exit(77 if arguments.test else 1)
# Let's print all statistics at the end
mlen = max(len(page) for page in stats)
- total = sum((item['stats'] for item in stats.values()), collections.Counter())
+ total = sum((item['stats'] for item in stats.values()), start=collections.Counter())
total = 'total', { "stats" : total, "modified" : False }
modified = []
classification = 'OUTDATED' if arguments.test else 'MODIFIED'