|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH OSSTEST] target_fetchurl: Handle undefined $c{HttpProxy}
Avoiding a usage of a potentially undefined variable.
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
Osstest/TestSupport.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 18b03b4..28ac572 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -1823,7 +1823,7 @@ END
sub target_fetchurl($$$;$) {
my ($ho, $url, $path, $timeo) = @_;
$timeo ||= 2000;
- my $useproxy = "export http_proxy=$c{HttpProxy};" if $c{HttpProxy};
+ my $useproxy = $c{HttpProxy} ? "export http_proxy=$c{HttpProxy};" : "";
target_cmd_root($ho, <<END, $timeo);
$useproxy wget --progress=dot:mega -O \Q$path\E \Q$url\E
END
--
2.6.1
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |