From 4c8d6e464b380b4f7b074d54be8a7b2d63fd92f8 Mon Sep 17 00:00:00 2001 From: Michal Minar Date: Wed, 4 Sep 2013 12:52:07 +0200 Subject: fix issues when creating instance for broken repository If repository has unaccessible metalink, some properties can not be obtained, set them to None. --- src/software/lmi/software/yumdb/repository.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/software/lmi/software/yumdb/repository.py b/src/software/lmi/software/yumdb/repository.py index 23fd5b8..33b77f7 100644 --- a/src/software/lmi/software/yumdb/repository.py +++ b/src/software/lmi/software/yumdb/repository.py @@ -201,7 +201,8 @@ def make_repository_from_db(repo): prop_name, repo.name, exc)) if prop_name == "ready": metadata[prop_name] = False - continue + else: + metadata[prop_name] = None res = Repository(id(repo), **metadata) return res -- cgit