diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-08-12 09:40:08 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-08-12 09:40:08 -0400 |
commit | fdf47ccf128645bd099f7da80487320e086d17fe (patch) | |
tree | f5652eab2e9efa7ec26cade6c5ecabdd5a067929 /src | |
parent | af02b7f106f581bd4e01a3326ccf5644ae96d1d4 (diff) | |
download | bcfg2-fdf47ccf128645bd099f7da80487320e086d17fe.tar.gz bcfg2-fdf47ccf128645bd099f7da80487320e086d17fe.tar.bz2 bcfg2-fdf47ccf128645bd099f7da80487320e086d17fe.zip |
testsuite: fixed more unit tests
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Bcfg2/Client/Tools/__init__.py | 3 | ||||
-rw-r--r-- | src/lib/Bcfg2/Options/Subcommands.py | 4 | ||||
-rw-r--r-- | src/lib/Bcfg2/Server/Plugin/helpers.py | 2 |
3 files changed, 4 insertions, 5 deletions
diff --git a/src/lib/Bcfg2/Client/Tools/__init__.py b/src/lib/Bcfg2/Client/Tools/__init__.py index ce75005fe..aab2459f2 100644 --- a/src/lib/Bcfg2/Client/Tools/__init__.py +++ b/src/lib/Bcfg2/Client/Tools/__init__.py @@ -8,9 +8,6 @@ import Bcfg2.Options import Bcfg2.Client import Bcfg2.Client.XML from Bcfg2.Utils import Executor, ClassName -from Bcfg2.Compat import walk_packages # pylint: disable=W0622 - -__all__ = [m[1] for m in walk_packages(path=__path__)] class ToolInstantiationError(Exception): diff --git a/src/lib/Bcfg2/Options/Subcommands.py b/src/lib/Bcfg2/Options/Subcommands.py index b529dd7fe..7d7a3f928 100644 --- a/src/lib/Bcfg2/Options/Subcommands.py +++ b/src/lib/Bcfg2/Options/Subcommands.py @@ -197,8 +197,10 @@ class CommandRegistry(object): cmd_obj = cmdcls() name = cmdcls.__name__.lower() cls.commands[name] = cmd_obj + # py2.5 can't mix *magic and non-magical keyword args, thus + # the **dict(...) cls.options.append( - Subparser(*cmdcls.options, name=name, help=cmdcls.__doc__)) + Subparser(*cmdcls.options, **dict(name=name, help=cmdcls.__doc__))) if issubclass(cls, cmd.Cmd) and cmdcls.interactive: setattr(cls, "do_%s" % name, cmd_obj) setattr(cls, "help_%s" % name, cmd_obj.parser.print_help) diff --git a/src/lib/Bcfg2/Server/Plugin/helpers.py b/src/lib/Bcfg2/Server/Plugin/helpers.py index 225b3491c..2d157eba9 100644 --- a/src/lib/Bcfg2/Server/Plugin/helpers.py +++ b/src/lib/Bcfg2/Server/Plugin/helpers.py @@ -163,7 +163,7 @@ class DatabaseBacked(Plugin): """ Whether or not the backend database must acquire a thread lock before writing, because it does not allow multiple threads to write.""" - return Bcfg2.Options.setup.db_engine == 'sqlite3' + return self._use_db and Bcfg2.Options.setup.db_engine == 'sqlite3' @staticmethod def get_db_lock(func): |