Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fixes key issues in consume and produce

  • Loading branch information...
commit 5ecd18129256876e9918c3d1bed94353989c4156 1 parent f5c422d
Davis Barber authored

Showing 3 changed files with 4 additions and 4 deletions. Show diff stats Hide diff stats

  1. +1 1  consume.py
  2. +2 2 lib/swarmtoolscore.py
  3. +1 1  produce.py
2  consume.py
@@ -36,7 +36,7 @@ def main():
36 36 sys.exit()
37 37 swarm_id = args[1]
38 38 resource_id = args[2]
39   - consume(server_info["hostname"], keys["consumer"], swarm_id, resource_id)
  39 + consume(server_info["hostname"], keys["participation"], swarm_id, resource_id)
40 40 else:
41 41 usage(sys.argv[0])
42 42 main()
4 lib/swarmtoolscore.py
@@ -61,10 +61,10 @@ def set_keys(hostname, user_id, password):
61 61 config.set("Keys", key_type, key_value)
62 62
63 63 if config.has_option("Keys", "configuration") == False:
64   - key_obj = create_key(user_id, password, "configuration")
  64 + key_obj = create_key(hostname, user_id, password, "configuration")
65 65 config.set("Keys", "configuration", key_obj["apikey"])
66 66 if config.has_option("Keys", "participation") == False:
67   - key_obj = create_key(user_id, password, "participation")
  67 + key_obj = create_key(hostname, user_id, password, "participation")
68 68 config.set("Keys", "participation", key_obj["apikey"])
69 69
70 70 with open("swarm.cfg", "wb") as configfile:
2  produce.py
@@ -68,7 +68,7 @@ def main():
68 68 sys.exit()
69 69 swarm_id = args[1]
70 70 resource_id = args[2]
71   - produce(server_info["hostname"], keys['master'], swarm_id, resource_id)
  71 + produce(server_info["hostname"], keys['participation'], swarm_id, resource_id)
72 72 else:
73 73 usage(sys.argv[0])
74 74

0 comments on commit 5ecd181

Please sign in to comment.
Something went wrong with that request. Please try again.