---
lib/python/koji_utils.py | 20 +++++++++++++-------
1 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/lib/python/koji_utils.py b/lib/python/koji_utils.py
index c9fad5d..3a1039a 100644
--- a/lib/python/koji_utils.py
+++ b/lib/python/koji_utils.py
@@ -114,13 +114,19 @@ class SimpleKojiClientSession(koji.ClientSession):
max_evr = (epoch, version, release)
'''
prev_rlss = {}
- for p in parents_for_tag[tag]:
- ptag = repoinfo.get(p,'tag')
- if ('-testing' in ptag or '-candidate' in ptag) and \
- not unstable_tags:
- # skip unstable tags
- continue
- prev_rlss[ptag] = self.latest_by_tag(ptag, name, max_evr=max_evr)
+ if parents_for_tag.has_key(tag):
+ for p in parents_for_tag[tag]:
+ ptag = repoinfo.get(p,'tag')
+ if ('-testing' in ptag or '-candidate' in ptag) and \
+ not unstable_tags:
+ # skip unstable tags
+ continue
+ prev_rlss[ptag] = self.latest_by_tag(ptag, name, max_evr=max_evr)
+ else:
+ '''FIXME - rawhide doesn't have a parent repo. In order to
find
+ the previously released package, may need to query the rawhide
+ repo, or use koji tag history'''
+
return prev_rlss
def list_previous_release(self, name, tag, max_evr=None,
--
1.7.0.1