diff options
author | Jan Cholasta <jcholast@redhat.com> | 2015-06-08 12:35:29 +0000 |
---|---|---|
committer | Jan Cholasta <jcholast@redhat.com> | 2015-07-01 13:05:30 +0000 |
commit | 5b39bc10033888c9d5e25ce37d6a6796221f12ad (patch) | |
tree | 9f268832191af176d9485397836ea106b408ce31 | |
parent | 2b12bca660e5dd65256e67b0815392173428247d (diff) | |
download | freeipa-5b39bc10033888c9d5e25ce37d6a6796221f12ad.tar.gz freeipa-5b39bc10033888c9d5e25ce37d6a6796221f12ad.tar.xz freeipa-5b39bc10033888c9d5e25ce37d6a6796221f12ad.zip |
plugable: Remove unused call method of Plugin
https://fedorahosted.org/freeipa/ticket/3090
Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
-rw-r--r-- | ipalib/plugable.py | 18 | ||||
-rw-r--r-- | ipatests/test_ipalib/test_plugable.py | 10 |
2 files changed, 0 insertions, 28 deletions
diff --git a/ipalib/plugable.py b/ipalib/plugable.py index 33b7a58fd..2ce7acfd6 100644 --- a/ipalib/plugable.py +++ b/ipalib/plugable.py @@ -31,7 +31,6 @@ import inspect import threading import os from os import path -import subprocess import optparse import errors import textwrap @@ -229,23 +228,6 @@ class Plugin(ReadOnly): "attribute '%s' of plugin '%s' was not set in finalize()" % (self.name, obj.name) ) - def call(self, executable, *args): - """ - Call ``executable`` with ``args`` using subprocess.call(). - - If the call exits with a non-zero exit status, - `ipalib.errors.SubprocessError` is raised, from which you can retrieve - the exit code by checking the SubprocessError.returncode attribute. - - This method does *not* return what ``executable`` sent to stdout... for - that, use `Plugin.callread()`. - """ - argv = (executable,) + args - self.debug('Calling %r', argv) - code = subprocess.call(argv) - if code != 0: - raise errors.SubprocessError(returncode=code, argv=argv) - def __repr__(self): """ Return 'module_name.class_name()' representation. diff --git a/ipatests/test_ipalib/test_plugable.py b/ipatests/test_ipalib/test_plugable.py index eb16cce2c..c0b88d1f9 100644 --- a/ipatests/test_ipalib/test_plugable.py +++ b/ipatests/test_ipalib/test_plugable.py @@ -97,16 +97,6 @@ class test_Plugin(ClassChecker): o.finalize() assert o.__islocked__() - def test_call(self): - """ - Test the `ipalib.plugable.Plugin.call` method. - """ - o = self.cls() - o.call(paths.BIN_TRUE) is None - e = raises(errors.SubprocessError, o.call, paths.BIN_FALSE) - assert e.returncode == 1 - assert e.argv == (paths.BIN_FALSE,) - def test_Registrar(): """ |