Skip to content

Commit

Permalink
made it compliant with current
Browse files Browse the repository at this point in the history
  • Loading branch information
a20r committed Sep 25, 2017
1 parent cf80107 commit a78c1ca
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/client_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@ def __init__(self, host, port, name, broadcasting, private_key,
self.timer = threading.Timer(0.1, self.descriptionSend)

def post_leaflet_urls(self):
payload = {"urls": self.leaflets}
post_url = "http://{}:{}/{}/leaflets".format(
self.host, self.port, self.private_key)
r = requests.post(post_url, data=payload)
return r
if len(self.leaflets) > 0:
payload = {"urls": self.leaflets}
post_url = "http://{}:{}/{}/leaflets".format(
self.host, self.port, self.private_key)
r = requests.post(post_url, data=payload)
return r

# Creates all connections and subscribers and starts them.
# Runs a loop that checks for received messages.
Expand Down

0 comments on commit a78c1ca

Please sign in to comment.