protect function argument
This commit is contained in:
parent
8763d20a08
commit
dae7b65107
1 changed files with 2 additions and 0 deletions
|
|
@ -107,6 +107,8 @@ class BackendsConfig(object):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
def add_backend(self, name, _type, params):
|
def add_backend(self, name, _type, params):
|
||||||
|
if not name:
|
||||||
|
raise ValueError(u'Please give a name to the backend.')
|
||||||
config = SafeConfigParser()
|
config = SafeConfigParser()
|
||||||
config.read(self.confpath)
|
config.read(self.confpath)
|
||||||
config.add_section(name)
|
config.add_section(name)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue