Skip to content

Commit

Permalink
PushBullet: Fix Bug in Reading Token from ini; Fix example; Fix Error…
Browse files Browse the repository at this point in the history
… Message

It looks like Pushbullet changed the structure of the JSON for error messages.  This should now cause them to be printed for diagnostic purposes.

Fixes issue reported in hollie#422 by @hollie
  • Loading branch information
krkeegan committed Jul 21, 2014
1 parent 25040ba commit 0261649
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Pushbullet.pm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Create a pushbullet instance in the .mht file, or in user code:
.mht file:
CODE, require Pushbullet; #noloop
CODE, my $push = new Pushbullet(); #noloop
CODE, $push = new Pushbullet(); #noloop
A user code file overriding parameters normally specified in mh.private.ini. All of the parameters are optional if properly configured in the ini file.
Expand Down Expand Up @@ -117,7 +117,7 @@ sub new {
# Only look for pushbullet settings
if ($mkey =~ /^Pushbullet_(.*$)/) {
# Drop the prefix
$self->{config}{$1} = $::config_parms{$1};
$self->{config}{$1} = $::config_parms{"Pushbullet_".$1};
}
}

Expand Down Expand Up @@ -380,7 +380,7 @@ sub push_hash {
}
else {
&::print_log(
"[Pushbullet] ERROR: POST Failed: Status: $decoded_json->{status} - $decoded_json->{errors} "
"[Pushbullet] ERROR: POST Failed: Status: $decoded_json->{error}{type} - $decoded_json->{error}{message} "
);
return;
}
Expand Down

0 comments on commit 0261649

Please sign in to comment.