diff --git a/tripleo_common/utils/tarball.py b/tripleo_common/utils/tarball.py index 147fa7e2b..696e2b02c 100644 --- a/tripleo_common/utils/tarball.py +++ b/tripleo_common/utils/tarball.py @@ -23,7 +23,8 @@ def create_tarball(directory, filename, options='-czf'): """Create a tarball of a directory.""" LOG.debug('Creating tarball of %s at location %s' % (directory, filename)) processutils.execute('/usr/bin/tar', '-C', directory, options, filename, - '--exclude', '.git', '--exclude', '.tox', '.') + '--exclude', '.git', '--exclude', '.tox', + '--exclude', '*.pyc', '--exclude', '*.pyo', '.') def tarball_extract_to_swift_container(object_client, filename, container):