diff --git a/doc/sphinx-bindoc b/doc/sphinx-bindoc index 44938b93a39a81b3428ae57a8f5a51a8fd6a2623..2b973f27bfa3deb0b515a0ba79e531b326d2717c 100755 --- a/doc/sphinx-bindoc +++ b/doc/sphinx-bindoc @@ -58,10 +58,13 @@ for prog in sorted(os.listdir(indir)): # write the output of --help f.write("%s\n%s\n\n" % ("Command line options", "".join(["-"] * len("Command line options")))) f.write("\n\n.. code-block:: none\n\n") - proc = subprocess.Popen([path_to_prog, "--help"], stdout = subprocess.PIPE) - helpmessage = proc.communicate()[0] - helpmessage = "\n".join([" %s" % l for l in helpmessage.split("\n")]) - f.write(helpmessage) + try: + proc = subprocess.Popen([path_to_prog, "--help"], stdout = subprocess.PIPE) + helpmessage = proc.communicate()[0] + helpmessage = "\n".join([" %s" % l for l in helpmessage.split("\n")]) + f.write(helpmessage) + except OSError: + pass # close the file f.close()