Fix the all and allc commands so they work with the new data format
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import main
|
||||
from yaml import dump
|
||||
from modules.network import Network
|
||||
from string import digits
|
||||
|
||||
class NetworkCommand:
|
||||
def __init__(self, *args):
|
||||
@@ -19,6 +20,9 @@ class NetworkCommand:
|
||||
if not spl[5].lower() in ["ssl", "plain"]:
|
||||
failure("Security must be ssl or plain, not %s" % spl[5])
|
||||
return
|
||||
if set(spl[2]).intersection(set(digits)):
|
||||
failure("Network name cannot contain numbers")
|
||||
return
|
||||
if not spl[6].lower() in ["sasl", "ns", "none"]:
|
||||
failure("Auth must be sasl, ns or none, not %s" % spl[5])
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user