Fix build failure

After copytree the destination directory might end up not being writable
- this causes failure for subsequent writeconfig tests. Force rwx
permissions to fix it.
This commit is contained in:
Max 2016-04-13 17:29:51 +02:00 committed by Holger Hans Peter Freyther
parent 334d680d28
commit 6c33a15e41
1 changed files with 2 additions and 1 deletions

View File

@ -17,7 +17,7 @@
import os
import os.path
import time
import sys, shutil
import sys, shutil, stat
import tempfile
import osmopy.obscvty as obscvty
@ -76,6 +76,7 @@ def copy_config(dirname, config):
shutil.rmtree(dirname, True)
ign = shutil.ignore_patterns('*.cfg')
shutil.copytree(os.path.dirname(config), dirname, ignore=ign)
os.chmod(dirname, stat.S_IRWXU)
try:
os.stat(dirname)