From d248dbca39e1e8a26a5aa9d39b28038690a406a0 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Mon, 24 Nov 2008 07:31:51 -0500 Subject: Replaced direct filesystem read from bugdir.py with RCS mediated read. Also replaced utility.FileString with StringIO() in cmdutil.py, which allowed the removal of utility.FileString and utility.get_file. The only remaining file().read() outside the RCS framework is the read in utility.editor_string(), but should probably not go through the RCS. --- libbe/cmdutil.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'libbe/cmdutil.py') diff --git a/libbe/cmdutil.py b/libbe/cmdutil.py index 55a7a72..6d7ab01 100644 --- a/libbe/cmdutil.py +++ b/libbe/cmdutil.py @@ -98,10 +98,9 @@ class CmdOptionParser(optparse.OptionParser): self._long_opt.iterkeys()]) def help_str(self): - fs = utility.FileString() - self.print_help(fs) - return fs.str - + f = StringIO() + self.print_help(f) + return f.getvalue() def underlined(instring): """Produces a version of a string that is underlined with '=' -- cgit