review feedback

This commit is contained in:
Michael Hudson-Doyle 2020-05-01 11:27:20 +12:00
parent c781c0f7c5
commit 405fc26923
3 changed files with 5 additions and 7 deletions

View File

@ -268,7 +268,7 @@ class InstallProgressController(SubiquityController):
log.debug('curtin install cmd: {}'.format(curtin_cmd)) log.debug('curtin install cmd: {}'.format(curtin_cmd))
async with self.app.install_lock_file.exclusive(): async with self.app.install_lock_file.exclusive():
self.app.install_lock_file.set_content(os.ttyname(0)) self.app.install_lock_file.write_content(os.ttyname(0))
journal.send("starting install", SYSLOG_IDENTIFIER="subiquity") journal.send("starting install", SYSLOG_IDENTIFIER="subiquity")
cp = await arun_command( cp = await arun_command(
self.logged_command(curtin_cmd), check=True) self.logged_command(curtin_cmd), check=True)

View File

@ -13,7 +13,6 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import fcntl
import logging import logging
import os import os
import platform import platform
@ -176,10 +175,9 @@ class Subiquity(Application):
async def _hide_install_running(self): async def _hide_install_running(self):
# Wait until the install has completed... # Wait until the install has completed...
async with self.install_lock_file.shared(): async with self.install_lock_file.shared():
pass # And remove the overlay.
# And remove the overlay. self.install_running = None
self.install_running = None self.ui.body.remove_overlay()
self.ui.body.remove_overlay()
def restart(self, remove_last_screen=True): def restart(self, remove_last_screen=True):
if remove_last_screen: if remove_last_screen:

View File

@ -58,7 +58,7 @@ class Lockfile:
self.fp.seek(0) self.fp.seek(0)
return self.fp.read() return self.fp.read()
def set_content(self, content): def write_content(self, content):
self.fp.seek(0) self.fp.seek(0)
self.fp.truncate() self.fp.truncate()
self.fp.write(content) self.fp.write(content)