summaryrefslogtreecommitdiff
path: root/src/services
diff options
context:
space:
mode:
Diffstat (limited to 'src/services')
-rwxr-xr-xsrc/services/vyos-http-api-server6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/services/vyos-http-api-server b/src/services/vyos-http-api-server
index 301c083a1..834c06b4d 100755
--- a/src/services/vyos-http-api-server
+++ b/src/services/vyos-http-api-server
@@ -109,13 +109,15 @@ def configure():
raise ConfigSessionError("Malformed command \"{0}\": missing \"op\" field".format(json.dumps(c)))
if not ('path' in c):
raise ConfigSessionError("Malformed command \"{0}\": missing \"path\" field".format(json.dumps(c)))
+
# Missing value is fine, substitute for empty string
- if not ('value' in c):
+ if 'value' in c:
+ value = c['value']
+ else:
value = ""
op = c['op']
path = c['path']
- value = c['value']
# Type checking
if not isinstance(path, list):