lowercase instance names (fix #48)

pull/1/head
Tao Bror Bojlén 2019-02-28 18:05:54 +00:00
rodzic 2e5696962b
commit dfc115f275
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: C6EC7AAB905F9E6F
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -76,7 +76,8 @@ class Command(BaseCommand):
if response.status_code != 200 or not isinstance(peers, list) or get_key(peers, ['error']):
raise InvalidResponseException("Could not get peers for {}".format(instance_name))
# Get rid of peers that just say "null" and the instance itself
return [peer for peer in peers if peer and peer != instance_name]
# Also make sure to lowercase all instance names; otherwise there'll be some duplicates
return [peer.lower() for peer in peers if peer and peer != instance_name]
@staticmethod
def get_statuses(instance_name: str):