[Bps-public-commit] GnuPG-Interface branch, master, updated. 0.44-2-g383a6a7

Alex Vandiver alexmv at bestpractical.com
Mon Oct 3 14:25:29 EDT 2011


The branch, master has been updated
       via  383a6a7069381e2dadcc3c2dc38bae53a546549d (commit)
      from  52e657687e8d5bad683a23845b0f3dcd896d4c7c (commit)

Summary of changes:
 lib/GnuPG/Interface.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

- Log -----------------------------------------------------------------
commit 383a6a7069381e2dadcc3c2dc38bae53a546549d
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Mon Oct 3 14:23:04 2011 -0400

    Include trailing empty fields when parsing colon-separated GnuPG output
    
    This avoids undefined warnings on later fields, such as expiration date,
    by ensuring they are set to the empty string rather than undef.
    
    Reported-by: Ville Mattila <vm at iki.fi>

diff --git a/lib/GnuPG/Interface.pm b/lib/GnuPG/Interface.pm
index 177ee2a..e1651b9 100644
--- a/lib/GnuPG/Interface.pm
+++ b/lib/GnuPG/Interface.pm
@@ -415,7 +415,7 @@ sub get_keys {
     while (<$stdout>) {
         my $line = $_;
         chomp $line;
-        my @fields = split ':', $line;
+        my @fields = split ':', $line, -1;
         next unless @fields > 3;
 
         my $record_type = $fields[0];

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list