Fixup oldest_peer
This commit is contained in:
parent
1ee652cbb4
commit
803b58a565
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user