[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm
raeburn
raeburn at source.lon-capa.org
Sat Oct 29 21:44:25 EDT 2016
raeburn Sun Oct 30 01:44:25 2016 EDT
Modified files:
/loncom/lonnet/perl lonnet.pm
Log:
- Exclude errors from hash returned by &lonnet::tmpget(),
- replaces change in rev. 1.951
[Note: lond::tmp_get_handler() returns error: 2IO::File->new Failed
instead of error: 2 IO::File->new Failed in case of error,
so usual regexp used in lonnet.pm -- /^error: 2 / will not match].
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1327 loncom/lonnet/perl/lonnet.pm:1.1328
--- loncom/lonnet/perl/lonnet.pm:1.1327 Wed Oct 5 21:21:06 2016
+++ loncom/lonnet/perl/lonnet.pm Sun Oct 30 01:44:24 2016
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.1327 2016/10/05 21:21:06 raeburn Exp $
+# $Id: lonnet.pm,v 1.1328 2016/10/30 01:44:24 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -6254,9 +6254,11 @@
if (!defined($server)) { $server = $perlvar{'lonHostID'}; }
my $rep=&reply("tmpget:$token",$server);
my %returnhash;
+ if ($rep =~ /^(con_lost|error|no_such_host)/i) {
+ return %returnhash;
+ }
foreach my $item (split(/\&/,$rep)) {
my ($key,$value)=split(/=/,$item);
- next if ($key =~ /^error: 2 /);
$returnhash{&unescape($key)}=&thaw_unescape($value);
}
return %returnhash;
More information about the LON-CAPA-cvs
mailing list