osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/python/osmo-python-tests/+/36936?usp=email )


Change subject: scripts/osmotestconfig: rmtree: no ignore_errors
......................................................................

scripts/osmotestconfig: rmtree: no ignore_errors

Do not ignore errors with shutil.rmtree(). The script expects to be able
to delete the directory, otherwise it will fail later on. So this hides
the original error and leads to a more confusing error later on.

Change-Id: I41616bb27af0d8b7da124ef309cd4a6e53be6597
---
M scripts/osmotestconfig.py
1 file changed, 15 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests 
refs/changes/36/36936/1

diff --git a/scripts/osmotestconfig.py b/scripts/osmotestconfig.py
index 8840741..6580fc7 100755
--- a/scripts/osmotestconfig.py
+++ b/scripts/osmotestconfig.py
@@ -68,7 +68,8 @@
     return ret

 def copy_config(dirname, config):
-    shutil.rmtree(dirname, True)
+    if os.path.exists(dirname):
+        shutil.rmtree(dirname)
     ign = shutil.ignore_patterns('*.cfg')
     shutil.copytree(os.path.dirname(config), dirname, ignore=ign)
     os.chmod(dirname, stat.S_IRWXU)

--
To view, visit 
https://gerrit.osmocom.org/c/python/osmo-python-tests/+/36936?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Change-Id: I41616bb27af0d8b7da124ef309cd4a6e53be6597
Gerrit-Change-Number: 36936
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <[email protected]>
Gerrit-MessageType: newchange

Reply via email to