[MOBY-guts] biomoby commit
Eddie Kawas
kawas at dev.open-bio.org
Wed Apr 30 16:53:37 UTC 2008
kawas
Wed Apr 30 12:53:36 EDT 2008
Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache
In directory dev.open-bio.org:/tmp/cvs-serv13442/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache
Modified Files:
ServiceCache.pm
Log Message:
added a check for situations when there is nothing in the ontology. This was causing an error before and now empty rdf is returned.
moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache ServiceCache.pm,1.2,1.3
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache/ServiceCache.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache/ServiceCache.pm 2008/02/21 17:15:40 1.2
+++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/RDF/Ontologies/Cache/ServiceCache.pm 2008/04/30 16:53:36 1.3
@@ -20,6 +20,7 @@
use Fcntl ':flock';
+use MOBY::RDF::Utils;
use MOBY::RDF::Ontologies::Services;
use MOBY::RDF::Ontologies::Cache::CacheUtils;
use MOBY::Client::Central;
@@ -430,6 +431,8 @@
File::Spec->catfile( $dir, $RDF ) );
};
warn $@ if $@;
+ # if it didnt parse correctly, reset to null
+ $doc = undef if $@;
next;
} unless $doc;
my $temp_doc = eval {
@@ -447,7 +450,8 @@
}
}
- $xml = $doc->toString();
+ $xml = $doc->toString() if $doc;
+ $xml = new MOBY::RDF::Utils->empty_rdf unless $doc;
# save new RDF file
open( FILE, ">$file" )
More information about the MOBY-guts
mailing list