summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2015-06-08 12:35:29 +0000
committerJan Cholasta <jcholast@redhat.com>2015-07-01 13:05:30 +0000
commit5b39bc10033888c9d5e25ce37d6a6796221f12ad (patch)
tree9f268832191af176d9485397836ea106b408ce31
parent2b12bca660e5dd65256e67b0815392173428247d (diff)
downloadfreeipa-5b39bc10033888c9d5e25ce37d6a6796221f12ad.zip
freeipa-5b39bc10033888c9d5e25ce37d6a6796221f12ad.tar.gz
freeipa-5b39bc10033888c9d5e25ce37d6a6796221f12ad.tar.xz
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.py18
-rw-r--r--ipatests/test_ipalib/test_plugable.py10
2 files changed, 0 insertions, 28 deletions
diff --git a/ipalib/plugable.py b/ipalib/plugable.py
index 33b7a58..2ce7acf 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 eb16cce..c0b88d1 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():
"""