diff options
author | Lars Wirzenius <liw@liw.fi> | 2014-01-11 12:18:44 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2014-01-11 12:18:44 +0000 |
commit | 23f23ea249e3f21090495327ba003824bf2c4fa4 (patch) | |
tree | a610ffab0c7d47d445b679df6904abb2d031f73c | |
parent | f368afbc8337a2d07d69a632c01cc5e678421011 (diff) | |
download | obnam-23f23ea249e3f21090495327ba003824bf2c4fa4.tar.gz |
Remove private helper method
_client_is_locked_by_us is repaced by got_client_lock. yay, less code.
-rw-r--r-- | obnamlib/fmt_6/repo_fmt_6.py | 11 | ||||
-rw-r--r-- | test-gpghome/random_seed | bin | 600 -> 600 bytes |
2 files changed, 3 insertions, 8 deletions
diff --git a/obnamlib/fmt_6/repo_fmt_6.py b/obnamlib/fmt_6/repo_fmt_6.py index ab88e136..79b8cf22 100644 --- a/obnamlib/fmt_6/repo_fmt_6.py +++ b/obnamlib/fmt_6/repo_fmt_6.py @@ -277,24 +277,18 @@ class RepositoryFormat6(obnamlib.RepositoryInterface): '''Return name of sub-directory for a given client.''' return str(client_id) - def _client_is_locked_by_us(self, client_name): - if client_name in self._open_client_infos: - open_client_info = self._open_client_infos[client_name] - return open_client_info.locked - return False - def _require_existing_client(self, client_name): if client_name not in self.get_client_names(): raise obnamlib.RepositoryClientDoesNotExist(client_name) def _require_client_lock(self, client_name): - if not self._client_is_locked_by_us(client_name): + if not self.got_client_lock(client_name): raise obnamlib.RepositoryClientNotLocked(client_name) def _raw_lock_client(self, client_name): tracing.trace('client_name=%s', client_name) - if self._client_is_locked_by_us(client_name): + if self.got_client_lock(client_name): raise obnamlib.RepositoryClientLockingFailed(client_name) client_id = self._get_client_id(client_name) @@ -339,6 +333,7 @@ class RepositoryFormat6(obnamlib.RepositoryInterface): self._setup_file_key_cache() def got_client_lock(self, client_name): + tracing.trace('client_name=%s', client_name) if client_name not in self._open_client_infos: return False open_client_info = self._open_client_infos[client_name] diff --git a/test-gpghome/random_seed b/test-gpghome/random_seed Binary files differindex 9f4628d1..9022d9e0 100644 --- a/test-gpghome/random_seed +++ b/test-gpghome/random_seed |