summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2015-11-01 09:49:01 +0200
committerLars Wirzenius <liw@liw.fi>2015-11-01 09:49:01 +0200
commitd4a356385dea27ee4ed226195cae4477a1259dee (patch)
tree5c5533027f20b67a89f8e3fe2914084b58667c62
parent7039ac929964ec4b148e965a309f0622d71fbca7 (diff)
downloadobnam-d4a356385dea27ee4ed226195cae4477a1259dee.tar.gz
Avoid calling _require_file_exists
This should avoid a little overlapping work.
-rw-r--r--obnamlib/fmt_ga/client.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/obnamlib/fmt_ga/client.py b/obnamlib/fmt_ga/client.py
index b151ff58..d2a91946 100644
--- a/obnamlib/fmt_ga/client.py
+++ b/obnamlib/fmt_ga/client.py
@@ -264,10 +264,13 @@ class GAClient(object):
def get_metadata_from_file_keys(self, gen_number, filename):
self._load_data()
- self._require_file_exists(gen_number, filename)
-
generation = self._lookup_generation_by_gen_number(gen_number)
metadata_obj = generation.get_file_metadata()
+ if not metadata_obj.file_exists(filename):
+ raise obnamlib.RepositoryFileDoesNotExistInGeneration(
+ client_name=self._client_name,
+ genspec=gen_number,
+ filename=filename)
return metadata_obj.get_metadata_from_file_keys(filename)
def set_file_key(self, gen_number, filename, key, value):