Fix the testr init subprocess call

The subprocess.call() to run testr init if the .testrepository dir
hasn't been created yet was setting passing the actual call assuming
shell=True, which it wasn't. This commit fixes this oversight to make
the call actually work.
This commit is contained in:
Matthew Treinish 2015-03-17 19:18:48 -04:00
parent eb6195b16e
commit 51e4fb6b9f

View File

@ -135,7 +135,7 @@ def main():
exit(3)
exclude_regex = construct_regex(opts.blacklist_file, opts.regex)
if not os.path.isdir('.testrepository'):
subprocess.call('testr init')
subprocess.call(['testr', 'init'])
if not opts.no_discover and not opts.pdb:
exit(call_testr(exclude_regex, opts.subunit, opts.pretty, opts.list,
opts.slowest))