osmith has submitted this change. ( 
https://gerrit.osmocom.org/c/python/osmo-python-tests/+/36938?usp=email )

Change subject: scripts/osmotestconfig: copy_config: tweak mkdir
......................................................................

scripts/osmotestconfig: copy_config: tweak mkdir

Run os.mkdir unconditionally, checking if it exists is not needed as we
run shutil.rmtree before.

Change-Id: I555c6d55ee1e288767192f83408a1f132544c928
---
M scripts/osmotestconfig.py
1 file changed, 13 insertions(+), 4 deletions(-)

Approvals:
  fixeria: Looks good to me, but someone else must approve
  Jenkins Builder: Verified
  laforge: Looks good to me, approved




diff --git a/scripts/osmotestconfig.py b/scripts/osmotestconfig.py
index d2d1f03..d6521ff 100755
--- a/scripts/osmotestconfig.py
+++ b/scripts/osmotestconfig.py
@@ -71,10 +71,7 @@
     if os.path.exists(dirname):
         shutil.rmtree(dirname)

-    try:
-        os.stat(dirname)
-    except OSError:
-        os.mkdir(dirname)
+    os.mkdir(dirname)

     prefix = os.path.basename(config)
     tmpfile = tempfile.NamedTemporaryFile(

--
To view, visit 
https://gerrit.osmocom.org/c/python/osmo-python-tests/+/36938?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: I555c6d55ee1e288767192f83408a1f132544c928
Gerrit-Change-Number: 36938
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>
Gerrit-MessageType: merged

Reply via email to