check configured names for spaces
reject equipment_ids and module names which contain spaces Change-Id: I0ffe8fee13122ddfff6715863d0a82f72b5cb9f6 Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/30711 Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de> Reviewed-by: Alexander Zaft <a.zaft@fz-juelich.de>
This commit is contained in:
parent
8c6f1a21ab
commit
9cab6670b9
@ -20,6 +20,7 @@
|
|||||||
#
|
#
|
||||||
# *****************************************************************************
|
# *****************************************************************************
|
||||||
import os
|
import os
|
||||||
|
import re
|
||||||
|
|
||||||
from frappy.errors import ConfigError
|
from frappy.errors import ConfigError
|
||||||
from frappy.lib import generalConfig
|
from frappy.lib import generalConfig
|
||||||
@ -65,6 +66,12 @@ class Mod(dict):
|
|||||||
cls=cls,
|
cls=cls,
|
||||||
description=description
|
description=description
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# matches name from spec
|
||||||
|
if not re.match(r'^[a-zA-Z]\w{0,62}$', name, re.ASCII):
|
||||||
|
raise ConfigError('Not a valid SECoP Module name: "%s". '
|
||||||
|
'Does it only contain letters, numbers and underscores?'
|
||||||
|
% (name))
|
||||||
# Make parameters out of all keywords
|
# Make parameters out of all keywords
|
||||||
groups = {}
|
groups = {}
|
||||||
for key, val in kwds.items():
|
for key, val in kwds.items():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user