Fix build failure
diff mbox

Message ID 1460561391-31296-1-git-send-email-msuraev@sysmocom.de
State Not Applicable
Headers show

Commit Message

Max April 13, 2016, 3:29 p.m. UTC
From: Max <msuraev@sysmocom.de>

After copytree the destination directory might end up not being writable
- this causes failure for subsequent writeconfig tests. Force rwx
permissions to fix it.
---
 osmopy/osmotestconfig.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch
diff mbox

diff --git a/osmopy/osmotestconfig.py b/osmopy/osmotestconfig.py
index 5c981d1..c601e82 100644
--- a/osmopy/osmotestconfig.py
+++ b/osmopy/osmotestconfig.py
@@ -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)