Revert "autotest: make lsb_release_content as a property for re-use."
This reverts commit 938fa6d1a16d9b17fbc54c760755897b277b13b8.
Reason for revert: half-speculative revert for...
BUG=chromium:722599
Original change's description:
> autotest: make lsb_release_content as a property for re-use.
>
> BUG=chromium:718532
> TEST=Run
> host = hosts.create_host('chromeos2-row8-rack4-host16.cros')
> host.get_release_version()
> host.get_release_version() (run it twice to test whether self.run
> is called again)
>
> Change-Id: Ida4d3ff22be2cde49c2379281abf053f1e75b5bd
> Reviewed-on: https://chromium-review.googlesource.com/502736
> Commit-Ready: Xixuan Wu <xixuan@chromium.org>
> Tested-by: Xixuan Wu <xixuan@chromium.org>
> Reviewed-by: Allen Li <ayatane@chromium.org>
>
BUG=chromium:718532
Change-Id: Id9f7ef9d6f06c7b1b0bd5bf4bba7629a3e9f5f16
Reviewed-on: https://chromium-review.googlesource.com/506495
Reviewed-by: David Riley <davidriley@chromium.org>
Tested-by: Aviv Keshet <akeshet@chromium.org>
diff --git a/server/hosts/cros_host.py b/server/hosts/cros_host.py
index bca9897..6d6d070 100644
--- a/server/hosts/cros_host.py
+++ b/server/hosts/cros_host.py
@@ -11,7 +11,6 @@
import common
from autotest_lib.client.bin import utils
from autotest_lib.client.common_lib import autotemp
-from autotest_lib.client.common_lib import decorators
from autotest_lib.client.common_lib import error
from autotest_lib.client.common_lib import global_config
from autotest_lib.client.common_lib import hosts
@@ -331,16 +330,6 @@
self.plankton = None
- @decorators.cached_property
- def _lsb_release_content(self):
- """Return lsb_release_content of the host.
-
- @return the string of the content in /etc/lsb-release file
- """
- return self.run(
- 'cat "%s"' % client_constants.LSB_RELEASE).stdout.strip()
-
-
def _get_cros_repair_image_name(self):
info = self.host_info_store.get()
if info.board is None:
@@ -1360,8 +1349,10 @@
@returns The version string in lsb-release, under attribute
CHROMEOS_RELEASE_VERSION.
"""
+ lsb_release_content = self.run(
+ 'cat "%s"' % client_constants.LSB_RELEASE).stdout.strip()
return lsbrelease_utils.get_chromeos_release_version(
- lsb_release_content=self._lsb_release_content)
+ lsb_release_content=lsb_release_content)
def verify_cros_version_label(self):