pw_toolchain: Fix pylint findings
Addresses a few minor pylint findings in pw_toolchain's python module.
Change-Id: Ia04a2d40bf641287bb254752e3a93e77129f7bf2
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/30760
Commit-Queue: Armando Montanez <amontanez@google.com>
Pigweed-Auto-Submit: Armando Montanez <amontanez@google.com>
Reviewed-by: Wyatt Hepler <hepler@google.com>
diff --git a/pw_toolchain/py/pw_toolchain/copy_with_metadata.py b/pw_toolchain/py/pw_toolchain/copy_with_metadata.py
index 59fde19..0d1402f 100644
--- a/pw_toolchain/py/pw_toolchain/copy_with_metadata.py
+++ b/pw_toolchain/py/pw_toolchain/copy_with_metadata.py
@@ -17,7 +17,6 @@
import logging
import os
import shutil
-import stat
import sys
_LOG = logging.getLogger(__name__)
@@ -34,8 +33,8 @@
shutil.copytree(src, dest, symlinks=True)
else:
shutil.copy2(src, dest, follow_symlinks=False)
- except:
- _LOG.error('Error during copying procedure.')
+ except: # pylint: disable=bare-except
+ _LOG.exception('Error during copying procedure.')
return -1
return 0