Cope with the fact that some of our commands output --help to stdout, some to stderr.
authorCarl Hetherington <cth@carlh.net>
Fri, 10 Mar 2023 21:19:16 +0000 (22:19 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 10 Mar 2023 21:19:16 +0000 (22:19 +0100)
doc/manual/cli.py

index 3a2493b4d202747d6c1178345d8ec020b6b055c6..88e75b0da9a063d1507143f90450dd790fc94f80 100644 (file)
@@ -7,7 +7,7 @@ print('<para>')
 print('<itemizedlist>')
 
 os.chdir('../..')
 print('<itemizedlist>')
 
 os.chdir('../..')
-for l in subprocess.run(['run/%s' % sys.argv[1], '--help'], stderr=subprocess.PIPE).stderr.splitlines():
+for l in subprocess.run(['run/%s' % sys.argv[1], '--help'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.splitlines():
     l = l.strip().decode('UTF-8')
     if not l.startswith('-'):
         continue
     l = l.strip().decode('UTF-8')
     if not l.startswith('-'):
         continue