diff options
author | Lars Wirzenius <liw@liw.fi> | 2015-07-21 22:21:09 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2015-07-21 22:21:09 +0300 |
commit | ae75b2e27545126818a3116b98d1c87a04aeeb5e (patch) | |
tree | 8a59fdb39c796137d1f2d86863a604fdbe704627 | |
parent | 9fdba9c4b127b475791e68571ddab9bcebdc0519 (diff) | |
download | obnam-ae75b2e27545126818a3116b98d1c87a04aeeb5e.tar.gz |
Return set from GAClientList.get_client_names
This makes the check whether a client exists much faster.
-rw-r--r-- | obnamlib/delegator.py | 2 | ||||
-rw-r--r-- | obnamlib/fmt_ga/client_list.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/obnamlib/delegator.py b/obnamlib/delegator.py index e1152477..f0c6038a 100644 --- a/obnamlib/delegator.py +++ b/obnamlib/delegator.py @@ -67,7 +67,7 @@ class RepositoryDelegator(obnamlib.RepositoryInterface): # def get_client_names(self): - return self._client_list.get_client_names() + return list(self._client_list.get_client_names()) def lock_client_list(self): self._require_we_have_not_locked_client_list() diff --git a/obnamlib/fmt_ga/client_list.py b/obnamlib/fmt_ga/client_list.py index 47a13fae..ccc49a94 100644 --- a/obnamlib/fmt_ga/client_list.py +++ b/obnamlib/fmt_ga/client_list.py @@ -71,7 +71,7 @@ class GAClientList(object): def get_client_names(self): self._load_data() if self._client_names is None: - self._client_names = self._data.get('clients', {}).keys() + self._client_names = set(self._data.get('clients', {}).keys()) return self._client_names def _load_data(self): |