diff --git a/aws_lambda_builders/utils.py b/aws_lambda_builders/utils.py index d5b2ec9aa..b8e6e3ea7 100644 --- a/aws_lambda_builders/utils.py +++ b/aws_lambda_builders/utils.py @@ -36,7 +36,7 @@ def copytree(source, destination, ignore=None): try: # Let's try to copy the directory metadata from source to destination shutil.copystat(source, destination) - except WindowsError as ex: # pylint: disable=undefined-variable + except OSError as ex: # Can't copy file access times in Windows LOG.debug("Unable to copy file access times from %s to %s", source, destination, exc_info=ex)