From d5731e11e291dcfe7f28d5bd87e0029ca9058cd8 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 13 Dec 2016 11:07:03 +0100 Subject: [plugins] implement add_copy_spec() by calling add_copy_spec_limit() Signed-off-by: Michael Adam --- sos/plugins/__init__.py | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py index 8f1bb74e..6a89e463 100644 --- a/sos/plugins/__init__.py +++ b/sos/plugins/__init__.py @@ -556,20 +556,7 @@ class Plugin(object): self.archive.add_link(link_path, _file) def add_copy_spec(self, copyspecs): - """Add a file specification (can be file, dir,or shell glob) to be - copied into the sosreport by this module. - """ - if isinstance(copyspecs, six.string_types): - copyspecs = [copyspecs] - for copyspec in copyspecs: - if self.use_sysroot(): - copyspec = self.join_sysroot(copyspec) - if not (copyspec and len(copyspec)): - self._log_warn("added null or empty copy spec") - return False - copy_paths = self._expand_copy_spec(copyspec) - self._add_copy_paths(copy_paths) - self._log_info("added copyspec '%s'" % copy_paths) + self.add_copy_spec_limit(copyspecs) def get_command_output(self, prog, timeout=300, stderr=True, chroot=True, runat=None, env=None): -- cgit