py3 - return result from yield

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
This commit is contained in:
Adam Stokes 2015-09-24 08:57:35 -04:00
parent ec60674b9a
commit 667fefb90f
1 changed files with 6 additions and 5 deletions

View File

@ -62,7 +62,7 @@ class InstallProgressController(ControllerPolicy):
log.error("Problem with curtin dispatch run")
raise Exception("Problem with curtin dispatch run")
raise Return(result)
return result
@coroutine
def initial_install(self):
@ -75,16 +75,17 @@ class InstallProgressController(ControllerPolicy):
log.debug('Curtin install cmd: {}'.format(curtin_cmd))
if self.opts.dry_run:
log.debug("Filesystem: this is a dry-run")
yield utils.run_command_async('cat /var/log/syslog',
write_fd)
result = yield utils.run_command_async('cat /var/log/syslog',
write_fd)
else:
try:
log.debug("filesystem: this is the *real* thing")
yield utils.run_command_async(" ".join(curtin_cmd),
write_fd)
result = yield utils.run_command_async(" ".join(curtin_cmd),
write_fd)
except:
log.error("Problem with initial curtin install")
raise Exception("Problem with initial curtin install")
return result
@coroutine
def show_progress(self):