Skip to content
Snippets Groups Projects
Commit 45245f59 authored by Erik Reid's avatar Erik Reid
Browse files

bugfix: remove extra json-ification of data before saving

parent 82ddc971
No related branches found
No related tags found
No related merge requests found
......@@ -27,31 +27,31 @@ class InventoryTask(Task):
pass
@staticmethod
def save_key(hostname, key, data):
def save_key(hostname, key, value):
r = redis.StrictRedis(
host=InventoryTask.config["redis"]["hostname"],
port=InventoryTask.config["redis"]["port"])
r.hset(
name=hostname,
key=key,
value=json.dumps(data))
value=value)
InventoryTask.logger.debug(
"saved %s, key %s" % (hostname, key))
return "OK"
@staticmethod
def save_key_json(hostname, key, data):
def save_key_json(hostname, key, data_obj):
InventoryTask.save_key(
hostname,
key,
json.dumps(data))
json.dumps(data_obj))
@staticmethod
def save_key_etree(hostname, key, data):
def save_key_etree(hostname, key, xml_doc):
InventoryTask.save_key(
hostname,
key,
etree.tostring(data, encoding='unicode'))
etree.tostring(xml_doc, encoding='unicode'))
class WorkerArgs(bootsteps.Step):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment