Skip to content

Commit 9435519

Browse files
[revert] Fix path resolve issue for windows.
IMPORTANT: This commit either should be reverted or removed before upmerge. Virtual Machine Windows is failing on path resolve calls. Signed-off-by: alperen sener <[email protected]>
1 parent 4d58b92 commit 9435519

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

autopts/utils.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@
3636
PTS_WORKSPACE_FILE_EXT = ".pqw6"
3737

3838
# Global paths for wid report
39-
BASE_DIR = Path(__file__).parent.parent.resolve()
39+
BASE_DIR = Path(__file__).parent.parent
40+
try:
41+
BASE_DIR = BASE_DIR.resolve()
42+
except OSError:
43+
BASE_DIR = BASE_DIR.absolute()
4044
LOG_DIR = BASE_DIR / "logs"
4145

4246
# Regex patterns for log field parsing in wid report
@@ -583,7 +587,11 @@ def extract_wid_testcases_to_csv(log_dir: Path = None):
583587
testcases_combined = " ".join(testcases)
584588
writer.writerow([wid, testcases_combined])
585589

586-
print(f"WID usage report saved to: {OUTPUT_CSV_PATH.resolve()}")
590+
try:
591+
_wid_path = OUTPUT_CSV_PATH.resolve()
592+
except OSError:
593+
_wid_path = OUTPUT_CSV_PATH.absolute()
594+
print(f"WID usage report saved to: {_wid_path}")
587595

588596

589597
Sep = re.compile(r'[,\s;|]+')

0 commit comments

Comments
 (0)