[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm
raeburn
raeburn at source.lon-capa.org
Wed Sep 22 09:52:02 EDT 2021
raeburn Wed Sep 22 13:52:02 2021 EDT
Modified files:
/loncom/lonnet/perl lonnet.pm
Log:
- Sanity checking
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1465 loncom/lonnet/perl/lonnet.pm:1.1466
--- loncom/lonnet/perl/lonnet.pm:1.1465 Tue Sep 21 22:54:27 2021
+++ loncom/lonnet/perl/lonnet.pm Wed Sep 22 13:52:02 2021
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.1465 2021/09/21 22:54:27 raeburn Exp $
+# $Id: lonnet.pm,v 1.1466 2021/09/22 13:52:02 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -14387,10 +14387,15 @@
sub additional_machine_domains {
my @domains;
- open(my $fh,"<","$perlvar{'lonTabDir'}/expected_domains.tab");
- while( my $line = <$fh>) {
- $line =~ s/\s//g;
- push(@domains,$line);
+ if (-e "$perlvar{'lonTabDir'}/expected_domains.tab") {
+ if (open(my $fh,"<","$perlvar{'lonTabDir'}/expected_domains.tab")) {
+ while (my $line = <$fh>) {
+ chomp($line);
+ $line =~ s/\s//g;
+ push(@domains,$line);
+ }
+ close($fh);
+ }
}
return @domains;
}
More information about the LON-CAPA-cvs
mailing list