removed newline char

This commit is contained in:
Brian Bjarke Jensen
2024-07-22 23:50:55 +02:00
parent 99b7067cfe
commit ec4162e34d
+3
View File
@@ -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