Browse files

fixes key issues in consume and produce

  • Loading branch information...
1 parent f5c422d commit 5ecd18129256876e9918c3d1bed94353989c4156 Davis Barber committed Oct 12, 2011
Showing with 4 additions and 4 deletions.
  1. +1 −1 consume.py
  2. +2 −2 lib/swarmtoolscore.py
  3. +1 −1 produce.py
View
2 consume.py
@@ -36,7 +36,7 @@ def main():
sys.exit()
swarm_id = args[1]
resource_id = args[2]
- consume(server_info["hostname"], keys["consumer"], swarm_id, resource_id)
+ consume(server_info["hostname"], keys["participation"], swarm_id, resource_id)
else:
usage(sys.argv[0])
main()
View
4 lib/swarmtoolscore.py
@@ -61,10 +61,10 @@ def set_keys(hostname, user_id, password):
config.set("Keys", key_type, key_value)
if config.has_option("Keys", "configuration") == False:
- key_obj = create_key(user_id, password, "configuration")
+ key_obj = create_key(hostname, user_id, password, "configuration")
config.set("Keys", "configuration", key_obj["apikey"])
if config.has_option("Keys", "participation") == False:
- key_obj = create_key(user_id, password, "participation")
+ key_obj = create_key(hostname, user_id, password, "participation")
config.set("Keys", "participation", key_obj["apikey"])
with open("swarm.cfg", "wb") as configfile:
View
2 produce.py
@@ -68,7 +68,7 @@ def main():
sys.exit()
swarm_id = args[1]
resource_id = args[2]
- produce(server_info["hostname"], keys['master'], swarm_id, resource_id)
+ produce(server_info["hostname"], keys['participation'], swarm_id, resource_id)
else:
usage(sys.argv[0])

0 comments on commit 5ecd181

Please sign in to comment.