removed newline char
This commit is contained in:
@@ -10,7 +10,10 @@ def get_model_name(
|
|||||||
"""Get model name from model_name file."""
|
"""Get model name from model_name file."""
|
||||||
assert isinstance(path, Path)
|
assert isinstance(path, Path)
|
||||||
assert path.exists(), f'{path} does not exist'
|
assert path.exists(), f'{path} does not exist'
|
||||||
|
# read file contents
|
||||||
with open(file=path, encoding='utf-8') as fh:
|
with open(file=path, encoding='utf-8') as fh:
|
||||||
model_name = fh.read()
|
model_name = fh.read()
|
||||||
|
# remove newline character
|
||||||
|
model_name = model_name.strip()
|
||||||
logging.debug('finished')
|
logging.debug('finished')
|
||||||
return model_name
|
return model_name
|
||||||
|
|||||||
Reference in New Issue
Block a user