From 646d4f93e1679192045705aef163f33020321c73 Mon Sep 17 00:00:00 2001 From: guido Date: Thu, 1 Feb 2007 15:13:59 +0100 Subject: [PATCH] [svn r37733] Removed two rather useless methods that just delegated to methods on the underlying object, in favour of calling the underlying object's methods directly (py.io.OutErrCapture.writeorg*). --HG-- branch : trunk --- py/apigen/apigen.py | 18 +++++++++--------- py/io/capture.py | 14 -------------- 2 files changed, 9 insertions(+), 23 deletions(-) diff --git a/py/apigen/apigen.py b/py/apigen/apigen.py index 27a1b1264..f0b35a246 100644 --- a/py/apigen/apigen.py +++ b/py/apigen/apigen.py @@ -32,25 +32,25 @@ def build(pkgdir, dsa, capture): apb = htmlgen.ApiPageBuilder(targetdir, l, dsa, pkgdir, namespace_tree) spb = htmlgen.SourcePageBuilder(targetdir, l, pkgdir) - capture.writeorgerr('preparing namespace pages\n') + capture.err.writeorg('preparing namespace pages\n') ns_data = apb.prepare_namespace_pages() - capture.writeorgerr('preparing class pages\n') + capture.err.writeorg('preparing class pages\n') class_names = dsa.get_class_names() class_data = apb.prepare_class_pages(class_names) - capture.writeorgerr('preparing function pages\n') + capture.err.writeorg('preparing function pages\n') function_names = dsa.get_function_names() func_data = apb.prepare_function_pages(function_names) - capture.writeorgerr('preparing source pages\n') + capture.err.writeorg('preparing source pages\n') source_data = spb.prepare_pages(pkgdir) - capture.writeorgerr('building namespace pages\n') + capture.err.writeorg('building namespace pages\n') apb.build_namespace_pages(ns_data, proj) - capture.writeorgerr('building class pages\n') + capture.err.writeorg('building class pages\n') apb.build_class_pages(class_data, proj) apb.build_method_pages(method_data, proj) - capture.writeorgerr('building function pages\n') + capture.err.writeorg('building function pages\n') apb.build_function_pages(func_data, proj) - capture.writeorgerr('building source pages\n') + capture.err.writeorg('building source pages\n') spb.build_pages(source_data, proj, pkgdir) - capture.writeorgerr('done building documentation\n') + capture.err.writeorg('done building documentation\n') diff --git a/py/io/capture.py b/py/io/capture.py index c79f0fc5a..26013f6b3 100644 --- a/py/io/capture.py +++ b/py/io/capture.py @@ -86,20 +86,6 @@ class OutErrCapture: err = errfile.read() return out, err - def writeorgout(self, str): - """ write something to the original stdout - """ - if not hasattr(self, 'out'): - raise IOError('stdout not patched') - self.out.writeorg(str) - - def writeorgerr(self, str): - """ write something to the original stderr - """ - if not hasattr(self, 'err'): - raise IOError('stderr not patched') - self.err.writeorg(str) - def callcapture(func, *args, **kwargs): """ call the given function with args/kwargs and return a (res, out, err) tuple where