[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm
raeburn
lon-capa-cvs@mail.lon-capa.org
Mon, 04 Dec 2006 16:24:12 -0000
raeburn Mon Dec 4 11:24:12 2006 EDT
Modified files:
/loncom/lonnet/perl lonnet.pm
Log:
lonnet::getkeys() should not report 'error: 2 tie(GDBM) Failed while attempting keys' as a key when the db file does not exist.
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.811 loncom/lonnet/perl/lonnet.pm:1.812
--- loncom/lonnet/perl/lonnet.pm:1.811 Fri Dec 1 16:52:30 2006
+++ loncom/lonnet/perl/lonnet.pm Mon Dec 4 11:24:11 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.811 2006/12/01 21:52:30 albertel Exp $
+# $Id: lonnet.pm,v 1.812 2006/12/04 16:24:11 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3044,6 +3044,7 @@
my $rep=reply("keys:$udomain:$uname:$namespace",$uhome);
my @keyarray=();
foreach my $key (split(/\&/,$rep)) {
+ next if ($key =~ /^error: 2 /);
push(@keyarray,&unescape($key));
}
return @keyarray;