mirror of
https://github.com/ceph/ceph
synced 2024-12-19 09:57:05 +00:00
Be less picky about trailing slashes.
This commit is contained in:
parent
568eccf86e
commit
fad71073e2
@ -55,12 +55,11 @@ def get_http_log_path(archive_dir, job_id=None):
|
||||
return None
|
||||
|
||||
sep = os.path.sep
|
||||
archive_dir = archive_dir.rstrip(sep)
|
||||
archive_subdir = archive_dir.split(sep)[-1]
|
||||
if archive_subdir.endswith(str(job_id)):
|
||||
archive_subdir = archive_dir.split(sep)[-2]
|
||||
|
||||
print archive_subdir
|
||||
|
||||
if job_id is None:
|
||||
return os.path.join(http_base, archive_subdir, '')
|
||||
return os.path.join(http_base, archive_subdir, str(job_id), '')
|
||||
|
Loading…
Reference in New Issue
Block a user