mirror of
https://github.com/netbox-community/Device-Type-Library-Import.git
synced 2025-01-22 13:28:34 +01:00
Merge pull request #42 from byts-tech/Fix--Issue-#8
Fixes #8: Strip all not supported chars in manufacturer slug
This commit is contained in:
commit
d11a527a40
@ -9,6 +9,7 @@ import argparse
|
||||
import os
|
||||
import settings
|
||||
import sys
|
||||
import re
|
||||
|
||||
|
||||
counter = Counter(added=0, updated=0, manufacturer=0)
|
||||
@ -26,7 +27,7 @@ def update_package(path: str, branch: str):
|
||||
|
||||
|
||||
def slugFormat(name):
|
||||
return name.lower().replace(' ', '_')
|
||||
return re.sub('\W+','-', name.lower())
|
||||
|
||||
YAML_EXTENSIONS = ['yml', 'yaml']
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user