Skip to content

Conversation

@AdamWill
Copy link
Contributor

I introduced a problem in baac24b by using locate_asset here.
Previously when the asset wasn't found, the variable ($iso or
whatever) would be the path where we were looking for it; now,
it's undef, and that actually causes the worker process to error
out trying to produce the error string. So let's keep the asset
filename around for the purpose of creating the error message,
and tweak the wording a bit.

@AdamWill
Copy link
Contributor Author

I'm pretty sure my change shouldn't cause that failure.

@coolo
Copy link
Contributor

coolo commented Oct 25, 2016

that's what QA always says

@coveralls
Copy link

Coverage Status

Coverage remained the same at 72.346% when pulling aa1a9f6 on AdamWill:asset-exist into 4b35dc1 on os-autoinst:master.

I introduced a problem in baac24b by using `locate_asset` here.
Previously when the asset wasn't found, the variable (`$iso` or
whatever) would be the path where we were looking for it; now,
it's undef. So the error message won't tell us what asset it was
looking for, and additionally we get a (non-fatal) perl error
constructing the error message. So let's keep the asset filename
around for the purpose of creating the error message, and tweak
the wording a bit.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 72.346% when pulling fbb0df3 on AdamWill:asset-exist into 2dd570e on os-autoinst:master.

Copy link
Contributor

@aaannz aaannz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@coolo coolo merged commit 7c3fac4 into os-autoinst:master Oct 26, 2016
my $hdd = $job->{settings}->{"HDD_$i"} || undef;
if ($hdd) {
$hdd = locate_asset('hdd', $hdd, 1);
my $hddname = $job->{settings}->{"HDD_$i"} || undef;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why the '|| undef'?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was introduced by @aplanas in 231d226 - so I assume this is his perl variant of how you provide defaults to hash accesses in python :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I didn't add that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants