diff options
author | Alvaro Neira Ayuso <aneira@soleta.eu> | 2020-01-18 13:56:25 +0100 |
---|---|---|
committer | Alvaro Neira Ayuso <alvaroneay@gmail.com> | 2020-01-19 19:50:44 +0100 |
commit | 51ad896deea2d2297a55d89bcae69c1fe369c895 (patch) | |
tree | af6569bcd553f9c17e6110abd745de92a146e380 | |
parent | 5603a280ef042b9ec0993ffa79f289aa2b2a9980 (diff) |
(Clean-Up) Rename jsoncmd variable to json_param
-rw-r--r-- | src/HTTPParser.py | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/HTTPParser.py b/src/HTTPParser.py index 50976c3..e0de594 100644 --- a/src/HTTPParser.py +++ b/src/HTTPParser.py @@ -55,51 +55,51 @@ class HTTPParser: msgs = self.headersAlone.rstrip().split('\n') cmd = msgs[len(msgs) - 1] try: - jsoncmd = json.loads(cmd) + json_param = json.loads(cmd) except ValueError as e: print ("Error: Json message incomplete") return if "run" in cmd: - self.cmd = jsoncmd["run"] + self.cmd = json_param["run"] try: - self.echo = jsoncmd["echo"] + self.echo = json_param["echo"] except: pass if "disk" in cmd: - self.disk = jsoncmd["disk"] + self.disk = json_param["disk"] if "partition" in cmd: if not "partition_setup" in cmd: - self.partition = jsoncmd["partition"] + self.partition = json_param["partition"] if "cache" in cmd: - self.cache = jsoncmd["cache"] + self.cache = json_param["cache"] if "cache_size" in cmd: - self.cache_size = jsoncmd["cache_size"] + self.cache_size = json_param["cache_size"] if "partition_setup" in cmd: - self.partition_setup = jsoncmd["partition_setup"] + self.partition_setup = json_param["partition_setup"] if "name" in cmd: - self.name = jsoncmd["name"] + self.name = json_param["name"] if "repository" in cmd: - self.repo = jsoncmd["repository"] + self.repo = json_param["repository"] if "type" in cmd: - self.type = jsoncmd["type"] + self.type = json_param["type"] if "profile" in cmd: - self.profile = jsoncmd["profile"] + self.profile = json_param["profile"] if "id" in cmd: - self.id = jsoncmd["id"] + self.id = json_param["id"] if "code" in cmd: - self.code = jsoncmd["code"] + self.code = json_param["code"] def getHeaderLine(self): return self.headersAlone |