minor fixes
Change-Id: Ic8ce37f62071bc928ea10a669da3ac7e43986f47 Reviewed-on: https://forge.frm2.tum.de/review/17156 Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de> Tested-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
This commit is contained in:
parent
62c2434f0f
commit
1c03b3c7f6
@ -119,6 +119,13 @@ class Server(object):
|
||||
raise ConfigError(
|
||||
'cfgfile %r: Module %s needs a class option!' %
|
||||
(self._cfgfile, devname))
|
||||
# MAGIC: transform \n.\n into \n\n which are normally stripped
|
||||
# by the ini parser
|
||||
for k in devopts:
|
||||
v = devopts[k]
|
||||
while '\n.\n' in v:
|
||||
v = v.replace('\n.\n', '\n\n')
|
||||
devopts[k] = v
|
||||
# try to import the class, raise if this fails
|
||||
devopts['class'] = get_class(devopts['class'])
|
||||
# all went well so far
|
||||
|
@ -42,6 +42,7 @@ class SimBase(object):
|
||||
# make a copy of self.PARAMS
|
||||
self.PARAMS=dict((k,v.copy()) for k,v in self.PARAMS.items())
|
||||
for k in extra_params.split(','):
|
||||
k = k.strip()
|
||||
self.PARAMS[k] = PARAM('extra_param: %s' % k.strip(),
|
||||
datatype=FloatRange(),
|
||||
default=0.0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user