mirror of https://github.com/eyhc1/rendercv.git
update some validation errors
This commit is contained in:
parent
dcbebfa4c8
commit
571260f2dd
|
@ -527,10 +527,7 @@ class Design(BaseModel):
|
||||||
# Go to fonts directory and check if the font exists:
|
# Go to fonts directory and check if the font exists:
|
||||||
fonts_directory = str(files("rendercv").joinpath("templates", "fonts"))
|
fonts_directory = str(files("rendercv").joinpath("templates", "fonts"))
|
||||||
if font not in os.listdir(fonts_directory):
|
if font not in os.listdir(fonts_directory):
|
||||||
raise ValueError(
|
raise ValueError(f'The font "{font}" is not found in the "fonts" directory')
|
||||||
f'The font "{font}" is not found in the "fonts" directory! To add a new'
|
|
||||||
" font, please see TO BE ADDED."
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
font_directory = os.path.join(fonts_directory, font)
|
font_directory = os.path.join(fonts_directory, font)
|
||||||
required_files = [
|
required_files = [
|
||||||
|
@ -552,8 +549,7 @@ class Design(BaseModel):
|
||||||
template_directory = str(files("rendercv").joinpath("templates", theme))
|
template_directory = str(files("rendercv").joinpath("templates", theme))
|
||||||
if f"{theme}.tex.j2" not in os.listdir(template_directory):
|
if f"{theme}.tex.j2" not in os.listdir(template_directory):
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
f'The theme "{theme}" is not found in the "templates" directory! To add'
|
f'The theme "{theme}" is not found in the "templates" directory!'
|
||||||
" a new theme, please see TO BE ADDED."
|
|
||||||
)
|
)
|
||||||
|
|
||||||
return theme
|
return theme
|
||||||
|
|
Loading…
Reference in New Issue