Revert "autotest: Fix querying hostinfo subdir"
This reverts commit 99fd6ea5d47a8e7ddb6ced3dc14d73baf44402a0.
Reason for revert: crbug/902158
Original change's description:
> autotest: Fix querying hostinfo subdir
>
> Need to join the subdir with job_dir before listing it to grab the
> unique host dir.
>
> BUG=b:116258296
> TEST=None
>
> Change-Id: Ie6f87a8d6fadd398dd221447cb278eeefe046879
> Reviewed-on: https://chromium-review.googlesource.com/1311736
> Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
> Tested-by: Allen Li <ayatane@chromium.org>
> Reviewed-by: Aviv Keshet <akeshet@chromium.org>
Bug: b:116258296
Change-Id: Id87012c99321be76bc843260ec72baa27639b952
Reviewed-on: https://chromium-review.googlesource.com/c/1319509
Commit-Queue: Alex Zamorzaev <zamorzaev@chromium.org>
Tested-by: Alex Zamorzaev <zamorzaev@chromium.org>
Reviewed-by: Allen Li <ayatane@chromium.org>
diff --git a/tko/models.py b/tko/models.py
index eac08d9..d8be245 100644
--- a/tko/models.py
+++ b/tko/models.py
@@ -335,9 +335,8 @@
#
# TODO(ayatane): We should pass hostinfo path explicitly.
subdir = 'host_info_store'
- hostinfo_dir = os.path.join(job_dir, subdir)
- hostinfo_path = os.path.join(hostinfo_dir, os.listdir(hostinfo_dir)[0],
- hostname + '.store')
+ subdir = os.path.join(subdir, os.listdir(subdir)[0])
+ hostinfo_path = os.path.join(job_dir, subdir, hostname + '.store')
store = file_store.FileStore(hostinfo_path)
hostinfo = store.get()
# TODO(ayatane): Investigate if urllib.quote is better.