Commit fecc7ac2 authored by David Johnson's avatar David Johnson

More flexibly handle output from docker image history in clientside.

parent b4481cbd
#!/usr/bin/perl #!/usr/bin/perl
# #
# Copyright (c) 2017, 2018 University of Utah and the Flux Group. # Copyright (c) 2017-2019 University of Utah and the Flux Group.
# #
# {{{EMULAB-LICENSE # {{{EMULAB-LICENSE
# #
...@@ -306,12 +306,14 @@ if ($debug) { ...@@ -306,12 +306,14 @@ if ($debug) {
# is a array of one array of hashes. Go figure... # is a array of one array of hashes. Go figure...
my $histref; my $histref;
if (defined($content) && ref($content) eq 'ARRAY') { if (defined($content) && ref($content) eq 'ARRAY') {
$histref = $content[0]; if (ref($content->[0]) eq 'ARRAY') {
if (ref($histref) eq 'ARRAY') { $histref = $content->[0];
$histref = $histref->[0]; }
else {
$histref = $content;
} }
} }
if (defined($histref)) { if (defined($histref) && ref($histref) eq 'ARRAY') {
foreach my $h (@{$histref}) { foreach my $h (@{$histref}) {
next next
if (!exists($h->{"Id"}) || !exists($h->{"Size"})); if (!exists($h->{"Id"}) || !exists($h->{"Size"}));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment