diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2019-03-22 12:08:39 +0000 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2019-03-22 18:31:09 +0000 |
commit | ca5a89090f7cb80330af69890513c6a07f6b3dba (patch) | |
tree | 86ca7e18c50039486ee5c04915c240e07080853a | |
parent | b9c222ec04dd1eeb5608ee68b7c794bac31767e0 (diff) | |
download | sos-ca5a89090f7cb80330af69890513c6a07f6b3dba.tar.gz |
[npm] do not call self.archive.add_string() directly
No plugin code outside of Plugin (and other classes defined in
the plugin module itself) should ever access the archive directly:
this is so that metadata is created, limits are respected, and
predicates applied.
Correct npm to use self.add_string_as_file().
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/plugins/npm.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sos/plugins/npm.py b/sos/plugins/npm.py index 40807747..0fc95801 100644 --- a/sos/plugins/npm.py +++ b/sos/plugins/npm.py @@ -76,7 +76,7 @@ class Npm(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin, SuSEPlugin): self._log_debug("modules in cache: %s" % output) outfn = self._make_command_filename("npm_cache_modules") - self.archive.add_string(json.dumps(output), outfn) + self.add_string_as_file(json.dumps(output), outfn) def setup(self): if self.get_option("project_path") != 0: |