diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2014-04-06 14:17:32 +0100 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2014-04-06 14:17:32 +0100 |
commit | ec8352b87e8378c58d5c2bc18f0b8f90656210fa (patch) | |
tree | 54a51bef6f1ca3d41f25ed3d6327804274b0ebab | |
parent | 5c8ad1bf85400aaacb82a478304bb77661d726a1 (diff) | |
download | sos-ec8352b87e8378c58d5c2bc18f0b8f90656210fa.tar.gz |
Make add_file() exception logging consistent
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/archive.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sos/archive.py b/sos/archive.py index cdc1f35e..df606566 100644 --- a/sos/archive.py +++ b/sos/archive.py @@ -118,8 +118,8 @@ class FileCacheArchive(Archive): self._check_path(dest) try: shutil.copy(src, dest) - except IOError: - self.log.info("caught IO error copying %s" % src) + except IOError as e: + self.log.debug("caught %s copying %s" % (e, src)) try: shutil.copystat(src, dest) except PermissionError: @@ -129,7 +129,7 @@ class FileCacheArchive(Archive): stat = os.stat(src) os.chown(dest, stat.st_uid, stat.st_gid) except Exception as e: - self.log.debug("caught %s setting ownership of %s" % (e,dest)) + self.log.debug("caught %s setting ownership of %s" % (e, dest)) self.log.debug("added %s to FileCacheArchive %s" % (src, self._archive_root)) |