[PATCH 4/7] doc/prerst2man.py: Fix 'os.system' -> 'system' typo

Subject: [PATCH 4/7] doc/prerst2man.py: Fix 'os.system' -> 'system' typo

Date: Sat, 5 Apr 2014 10:31:08 -0700

To: notmuch@notmuchmail.org

Cc:

From: W. Trevor King


Avoid:

  $ make HAVE_SPHINX=0 HAVE_RST2MAN=1 build-man
  python ./doc/prerst2man.py ./doc doc/_build/man
  Traceback (most recent call last):
    File "./doc/prerst2man.py", line 65, in <module>
      os.system('set -x; rst2man {0} {1}/{2}.{3}'
  NameError: name 'os' is not defined
  make: *** [doc/_build/man/man1/notmuch.1] Error 1

by using system directly.  We don't need the 'os.' namespacing,
because the function was imported with:

  from os import makedirs, system
---
 doc/prerst2man.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/prerst2man.py b/doc/prerst2man.py
index 108f4a3..437dea9 100644
--- a/doc/prerst2man.py
+++ b/doc/prerst2man.py
@@ -59,5 +59,5 @@ for page in man_pages:
     outfile.write("".join(lines))
     outfile.close()
 
-    os.system('set -x; rst2man {0} {1}/{2}.{3}'
-              .format(filename, outdir, page[0],page[4]))
+    system('set -x; rst2man {0} {1}/{2}.{3}'
+           .format(filename, outdir, page[0], page[4]))
-- 
1.9.1.353.gc66d89d


Thread: