Fixup oldest_peer

This commit is contained in:
James Page 2013-03-18 17:31:32 +00:00
parent 1ee652cbb4
commit 803b58a565

View File

@ -56,9 +56,9 @@ def peer_units():
def oldest_peer(peers):
local_unit_no = os.getenv('JUJU_UNIT_NAME').split('/')[1]
local_unit_no = int(os.getenv('JUJU_UNIT_NAME').split('/')[1])
for peer in peers:
remote_unit_no = peer.split('/')[1]
remote_unit_no = int(peer.split('/')[1])
if remote_unit_no < local_unit_no:
return False
return True