[Rt-commit] rt branch, 4.0/improve-gpg-misconfig-logging, created. rt-4.0.4-233-gd2d4648
Kevin Falcone
falcone at bestpractical.com
Wed Jan 25 12:59:17 EST 2012
The branch, 4.0/improve-gpg-misconfig-logging has been created
at d2d46485ee4d3b999eee474b74ed3024c263e4bd (commit)
- Log -----------------------------------------------------------------
commit d2d46485ee4d3b999eee474b74ed3024c263e4bd
Author: Dominic Hargreaves <dom at earth.li>
Date: Tue Jan 24 21:49:51 2012 +0000
Advise about GPG configuration in GPG error message
When logging error messages from GPG, also provide a pointer to
RT_Config.pm to help the user configure or disable GPG support.
diff --git a/lib/RT/Crypt/GnuPG.pm b/lib/RT/Crypt/GnuPG.pm
index ab444d0..bc7e2e8 100644
--- a/lib/RT/Crypt/GnuPG.pm
+++ b/lib/RT/Crypt/GnuPG.pm
@@ -2122,7 +2122,10 @@ sub GetKeysInfo {
}
$RT::Logger->debug( $res{'status'} ) if $res{'status'};
$RT::Logger->warning( $res{'stderr'} ) if $res{'stderr'};
- $RT::Logger->error( $res{'logger'} ) if $res{'logger'} && $?;
+ if ( $res{'logger'} && $? ) {
+ $RT::Logger->error( $res{'logger'} );
+ $RT::Logger->error( 'The above error may result from an unconfigured RT/GPG installation. See perldoc etc/RT_Config.pm for information about configuring or disabling GPG support for RT' );
+ }
if ( $@ || $? ) {
$res{'message'} = $@? $@: "gpg exitted with error code ". ($? >> 8);
return %res;
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list