replace filtered characters with underscore
This commit is contained in:
parent
06808a3d0d
commit
87d5c3e496
1 changed files with 1 additions and 1 deletions
|
@ -477,7 +477,7 @@ class GGUFWriter:
|
|||
template = choice.get('template')
|
||||
|
||||
# Allowing non-alphanumerical characters in template name is probably not a good idea, so filter it
|
||||
name = ''.join((c for c in name if c in ['_'] + list(ascii_letters) + list(digits)))
|
||||
name = ''.join((c if c in ascii_letters + digits else '_' for c in name))
|
||||
|
||||
if name and template is not None:
|
||||
if name == 'default':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue