summaryrefslogtreecommitdiffstats
path: root/config/chroot_local-includes
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2020-10-09 07:05:47 +0000
committerintrigeri <intrigeri@boum.org>2020-10-09 07:09:51 +0000
commit26b9b1b83f3857232474dd2291889867e80a3b45 (patch)
tree6646014e0e749c17d92487b4d14b91a5761f8297 /config/chroot_local-includes
parent383a910db476fff1f1705d7cb1e4984245e90f9e (diff)
Lint
Diffstat (limited to 'config/chroot_local-includes')
-rw-r--r--config/chroot_local-includes/usr/src/iuk/lib/Tails/IUK/Frontend.pm23
1 files changed, 15 insertions, 8 deletions
diff --git a/config/chroot_local-includes/usr/src/iuk/lib/Tails/IUK/Frontend.pm b/config/chroot_local-includes/usr/src/iuk/lib/Tails/IUK/Frontend.pm
index 4305010..03f19c2 100644
--- a/config/chroot_local-includes/usr/src/iuk/lib/Tails/IUK/Frontend.pm
+++ b/config/chroot_local-includes/usr/src/iuk/lib/Tails/IUK/Frontend.pm
@@ -577,9 +577,15 @@ method get_target_files (HashRef $upgrade_path, CodeRef $url_transform, AbsDir $
$exit_code = $?;
}
else {
- my ($download_h,$zenity_h,$download_out);
- $download_h = IPC::Run::start \@cmd,\undef,\$download_out, '2>',\$stderr;
- $zenity_h = IPC::Run::start [qw{zenity --progress --percentage=0 --auto-close}, '--title', $title, '--text', $info],\$download_out;
+ my ($download_h, $zenity_h, $download_out);
+ $download_h = IPC::Run::start \@cmd,
+ \undef, \$download_out, '2>', \$stderr;
+ $zenity_h = IPC::Run::start
+ [
+ qw{zenity --progress --percentage=0 --auto-close},
+ '--title', $title, '--text', $info
+ ],
+ \$download_out;
try {
while ($zenity_h->pumpable && $download_h->pumpable ) {
$download_h->pump_nb;
@@ -738,17 +744,18 @@ method shutdown_network () {
method cancel_download () {
$self->info("Cancelling the upgrade download");
+ return unless $ENV{HARNESS_ACTIVE};
+
$self->fatal_run_cmd(
- cmd => ['tails-iuk-cancel-download'],
+ cmd => ['tails-iuk-cancel-download'],
error_title => $self->encoding->decode(gettext(
q{Error while cancelling the upgrade download}
)),
- error_msg => $self->encoding->decode(gettext(
+ error_msg => $self->encoding->decode(gettext(
q{Failed to cancel the upgrade download}
)),
- as => 'root',
- ) unless $ENV{HARNESS_ACTIVE};
-
+ as => 'root',
+ );
}
method install_iuk (HashRef $upgrade_path, AbsDir $target_files_tempdir) {