save_variables: Check lowercase variable names
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
This commit is contained in:
committed by
KevinOConnor
parent
2c90c97ccd
commit
8a2de5f23e
@@ -36,6 +36,8 @@ class SaveVariables:
|
||||
cmd_SAVE_VARIABLE_help = "Save arbitrary variables to disk"
|
||||
def cmd_SAVE_VARIABLE(self, gcmd):
|
||||
varname = gcmd.get('VARIABLE')
|
||||
if (varname.lower() != varname):
|
||||
raise gcmd.error("VARIABLE must not contain upper case")
|
||||
value = gcmd.get('VALUE')
|
||||
try:
|
||||
value = ast.literal_eval(value)
|
||||
|
||||
Reference in New Issue
Block a user