[PATCH] Fix build failure

msuraev at sysmocom.de msuraev at sysmocom.de
Wed Apr 13 15:29:51 UTC 2016


From: Max <msuraev at 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(-)

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)
-- 
2.8.1




More information about the OpenBSC mailing list