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(