[Bug] Updated os.path calls to pathlib (#3110)

* Updated os.path calls to pathlib

* fixed typo

* os.join replacement typo

* additional join typo

* updated os directory functions

* exist_ok typo

* cleanup

* Updated for cleanliness

---------

Co-authored-by: Mika Ayenson <Mikaayenson@users.noreply.github.com>

(cherry picked from commit 16550b7144)
This commit is contained in:
eric-forte-elastic
2023-09-28 16:32:55 -04:00
committed by github-actions[bot]
parent 3b2a09d55c
commit add7ce9508
57 changed files with 253 additions and 300 deletions
+5 -4
View File
@@ -3,9 +3,10 @@
# 2.0; you may not use this file except in compliance with the Elastic License
# 2.0.
from . import common
from . import RtaMetadata
import os
from pathlib import Path
from . import RtaMetadata, common
metadata = RtaMetadata(
uuid="a3b26c9e-6910-43f7-93b2-84cc777e54f4",
@@ -32,8 +33,8 @@ def main():
cscript = "C:\\Users\\Public\\cscript.exe"
executable = path + "Javafake.exe"
if not os.path.exists(path):
os.makedirs(path)
if not Path(path).is_dir():
Path(path).mkdir(parents=True)
else:
pass
common.copy_file(EXE_FILE, cscript)