Skip to content

Commit

Permalink
Merge pull request #247 from chtsai0105/main
Browse files Browse the repository at this point in the history
🐛 Fix the NoneType error during initating the LCA object (#246)
  • Loading branch information
evanroyrees authored Mar 15, 2022
2 parents ad0364a + c38bcd4 commit 3e581b9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions autometa/taxonomy/lca.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,17 @@ class LCA(NCBI):
"""

def __init__(self, dbdir: str, verbose: bool = False, cache: str = None):
def __init__(self, dbdir: str, verbose: bool = False, cache: str = ""):
super().__init__(dbdir, verbose=verbose)
self.verbose = verbose
self.dbdir = dbdir
self.cache = cache
self.disable = False if verbose else True
if self.cache == None:
self.cache = ""
if self.cache and not os.path.exists(self.cache):
logger.info(f"Created LCA cache dir: {self.cache}")
os.makedirs(self.cache)
logger.info(f"Created LCA cache dir: {self.cache}")
self.tour_fp = os.path.join(self.cache, "tour.pkl.gz")
self.tour = None
self.level_fp = os.path.join(self.cache, "level.pkl.gz")
Expand Down

0 comments on commit 3e581b9

Please sign in to comment.