diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2019-11-04 10:48:01 +0000 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2019-11-04 10:48:01 +0000 |
commit | 68f4d7cc7adde00171af842b5bc808f41d888a87 (patch) | |
tree | c3778fc03876035ac70811943f7dce8fccb94307 | |
parent | c4182ebd52af523261d2e7ef75affbb88eaf31fb (diff) | |
download | sos-68f4d7cc7adde00171af842b5bc808f41d888a87.tar.gz |
[Plugin] improve _copy_dir() variable naming
Directory entries found in _copy_dir() may be either files or
sub-directories: reflect this in the names of local variables.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/plugins/__init__.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py index 240fe9f1..1a1464c1 100644 --- a/sos/plugins/__init__.py +++ b/sos/plugins/__init__.py @@ -738,10 +738,11 @@ class Plugin(object): def _copy_dir(self, srcpath): try: - for afile in os.listdir(srcpath): + for name in os.listdir(srcpath): self._log_debug("recursively adding '%s' from '%s'" - % (afile, srcpath)) - self._do_copy_path(os.path.join(srcpath, afile), dest=None) + % (name, srcpath)) + path = os.path.join(srcpath, name) + self._do_copy_path(path) except OSError as e: if e.errno == errno.ELOOP: msg = "Too many levels of symbolic links copying" |