Be less picky about trailing slashes.

This commit is contained in:
Zack Cerza 2013-09-16 11:37:39 -05:00
parent 568eccf86e
commit fad71073e2

View File

@ -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), '')