Merge pull request #38 from blueboxgroup/safe-config-copy
Use distutils copy_tree instead of shutil.copytree
This commit is contained in:
commit
df3a953a79
@ -14,6 +14,7 @@
|
|||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
|
|
||||||
|
import distutils.dir_util
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
@ -108,10 +109,7 @@ class PackageBuilder(Builder):
|
|||||||
else:
|
else:
|
||||||
LOG.debug("Copying config from '%s' to '%s'", src_config,
|
LOG.debug("Copying config from '%s' to '%s'", src_config,
|
||||||
dest_config)
|
dest_config)
|
||||||
if not os.path.exists(dest_config):
|
distutils.dir_util.copy_tree(src_config, dest_config)
|
||||||
shutil.copytree(src_config, dest_config)
|
|
||||||
else:
|
|
||||||
shutil.copy2(src_config, dest_config)
|
|
||||||
|
|
||||||
if spec.settings.gerrit_dependencies:
|
if spec.settings.gerrit_dependencies:
|
||||||
self._install_gerrit_dependencies(repo, project, install_path)
|
self._install_gerrit_dependencies(repo, project, install_path)
|
||||||
|
Loading…
Reference in New Issue
Block a user