Skip to content

Commit 7cb3b5e

Browse files
committed
replace os.path usage by Path methods
1 parent 4a7b2a3 commit 7cb3b5e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ceph_devstack/resources/ceph/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,12 +254,12 @@ def get_log_file(self, run_name: str = None, job_id: str = None):
254254

255255
if not run_name:
256256
run_name = get_most_recent_run(os.listdir(archive_dir))
257-
run_dir = os.path.join(archive_dir, run_name)
257+
run_dir = archive_dir.joinpath(run_name)
258258

259259
if not job_id:
260260
job_id = get_job_id(os.listdir(run_dir))
261261

262-
log_file = os.path.join(run_dir, job_id, "teuthology.log")
263-
if not os.path.exists(log_file):
262+
log_file = run_dir.joinpath(job_id, "teuthology.log")
263+
if not log_file.exists():
264264
raise FileNotFoundError
265265
return log_file

0 commit comments

Comments
 (0)