Skip to content
This repository has been archived by the owner on Apr 13, 2021. It is now read-only.

Commit

Permalink
Merge pull request #32 from techman83/error_parse_issue
Browse files Browse the repository at this point in the history
Fix issue with Error parsing
  • Loading branch information
techman83 committed Sep 3, 2015
2 parents 6acfc2c + 7ff096d commit 5ee2870
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/App/KSP_CKAN/Tools/NetKAN.pm
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ method inflate {
$self->_status->inflated;

if ($exit) {
my $error = $self->_parse_error($stdout);
my $error = $stdout ? $self->_parse_error($stdout) : $self->_parse_error($stderr);
$self->warn("'".$self->file."' - ".$error);
$self->_status->failure($error);
return $exit;
Expand Down
2 changes: 1 addition & 1 deletion t/App/KSP_CKAN/Tools/NetKAN.t
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ TODO: {
isnt( $netkan->inflate, 0, "Return failure correctly" );

subtest 'Status Setting' => sub {
is($status->status->{'DogeCoinFlag-broken'}{last_error}, "Error wasn't parsable", "'last_error' set on failure");
is($status->status->{'DogeCoinFlag-broken'}{last_error}, "JSON deserialization error", "'last_error' set on failure");
is($status->status->{'DogeCoinFlag-broken'}{failed}, 1, "'failed' true on failure");
is($status->status->{'DogeCoinFlag-broken'}{last_indexed}, undef, "'last_index' undef when no successful indexing has ever occured");
is($status->status->{'DogeCoinFlag'}{last_error}, undef, "'last_error' undef on success");
Expand Down

0 comments on commit 5ee2870

Please sign in to comment.