Permalink
Browse files

A few minor bug fixes.

  • Loading branch information...
bendmorris authored and etal committed Feb 13, 2013
1 parent 76928e4 commit 2dd611b18d97bbdfda62e7122f92cb98ea4d5adb
Showing with 7 additions and 8 deletions.
  1. +5 −5 Bio/Phylo/CDAOIO.py
  2. +2 −3 Bio/Phylo/_io.py
View
@@ -28,6 +28,10 @@
import os
import urlparse
+class CDAOError(Exception):
+ """Exception raised when CDAO object construction cannot continue."""
+ pass
+
try:
import RDF
import Redland
@@ -47,10 +51,6 @@ def node_uri(graph, uri):
else:
return RDF.Uri(urlparse.urljoin(graph, '#%s' % uri))
-class CDAOError(Exception):
- """Exception raised when CDAO object construction cannot continue."""
- pass
-
def new_storage():
'''Create a new in-memory Redland store for storing the RDF model.'''
@@ -270,7 +270,7 @@ def __init__(self, trees):
self.tree_counter = 0
def write(self, handle, mime_type='text/turtle', tree_uri='tree', context=None,
- storage=None, record_complete_ancestry=False):
+ storage=None, record_complete_ancestry=False, **kwargs):
"""Write this instance's trees to a file handle.
Keywords:
View
@@ -30,9 +30,8 @@
try:
from Bio.Phylo import CDAOIO
- supported_formats.update('cdao', CDAOIO)
-except:
- pass
+ supported_formats['cdao'] = CDAOIO
+except: pass
def parse(file, format, **kwargs):

0 comments on commit 2dd611b

Please sign in to comment.