Fix another bug related to Language.__init__'s path parameter

This commit is contained in:
Mark Amery 2016-11-20 20:31:34 +00:00
parent 2dc305f46b
commit fbe19680a6
1 changed files with 1 additions and 1 deletions

View File

@ -246,7 +246,7 @@ class Language(object):
self.end_training() self.end_training()
def __init__(self, path=True, **overrides): def __init__(self, path=True, **overrides):
if 'data_dir' in overrides and 'path' not in overrides: if 'data_dir' in overrides and path is True:
raise ValueError("The argument 'data_dir' has been renamed to 'path'") raise ValueError("The argument 'data_dir' has been renamed to 'path'")
if isinstance(path, basestring): if isinstance(path, basestring):
path = pathlib.Path(path) path = pathlib.Path(path)