diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-08-12 08:26:50 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-08-12 08:29:53 -0400 |
commit | 5c573e00a168c90c5c718566c75aadf736566676 (patch) | |
tree | 0dba4d9411304f4d29daf3569535227be8939abf /src/lib/Bcfg2/Options/Subcommands.py | |
parent | 0f7edd60e67d32438a8be42002faacde4e4a7649 (diff) | |
download | bcfg2-5c573e00a168c90c5c718566c75aadf736566676.tar.gz bcfg2-5c573e00a168c90c5c718566c75aadf736566676.tar.bz2 bcfg2-5c573e00a168c90c5c718566c75aadf736566676.zip |
testsuite: fixed more unit tests
Diffstat (limited to 'src/lib/Bcfg2/Options/Subcommands.py')
-rw-r--r-- | src/lib/Bcfg2/Options/Subcommands.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/Bcfg2/Options/Subcommands.py b/src/lib/Bcfg2/Options/Subcommands.py index 53c4e563f..b529dd7fe 100644 --- a/src/lib/Bcfg2/Options/Subcommands.py +++ b/src/lib/Bcfg2/Options/Subcommands.py @@ -8,10 +8,11 @@ import copy import shlex import logging from Bcfg2.Compat import StringIO +# pylint: disable=W0403 from OptionGroups import Subparser from Options import PositionalArgument from Parser import Parser, setup as master_setup - +# pylint: enable=W0403 __all__ = ["Subcommand", "HelpCommand", "CommandRegistry", "register_commands"] @@ -94,9 +95,9 @@ class Subcommand(object): def usage(self): """ Get the short usage message. """ if self._usage is None: - io = StringIO() - self.parser.print_usage(file=io) - usage = self._ws_re.sub(' ', io.getvalue()).strip()[7:] + sio = StringIO() + self.parser.print_usage(file=sio) + usage = self._ws_re.sub(' ', sio.getvalue()).strip()[7:] doc = self._ws_re.sub(' ', getattr(self, "__doc__")).strip() if doc is None: self._usage = usage |