when hit not have enough permission to run dmesg, the result.stderr is empty, but result.exit_code is 1. (#1135)

This commit is contained in:
LiliDeng 2020-12-22 11:52:55 +08:00 коммит произвёл Chi Song
Родитель e9b140e4af
Коммит 297c60cda2
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -62,7 +62,7 @@ class Dmesg(Tool):
# sometime it need sudo, we can retry
# so no_error_log for first time
result = self.run(no_error_log=True)
if result.stderr:
if result.exit_code != 0:
# may need sudo
result = self.node.execute("sudo dmesg")
self._cached_result = result