summaryrefslogtreecommitdiffstats
path: root/shared/prestoTransaction.py
diff options
context:
space:
mode:
Diffstat (limited to 'shared/prestoTransaction.py')
-rw-r--r--shared/prestoTransaction.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/shared/prestoTransaction.py b/shared/prestoTransaction.py
index 15ad928..8a46211 100644
--- a/shared/prestoTransaction.py
+++ b/shared/prestoTransaction.py
@@ -24,8 +24,14 @@ def find_available_drpms(conduit, newpkg):
rpmdb = conduit.getRpmDB()
- # Saves us some typing
- p_repo = newpkg.po.repo.p_repo
+ # Set p_repo to be packages delta repository or set to False if
+ # there is no delta repository
+ try:
+ p_repo = newpkg.po.repo.p_repo
+ drpm_enabled = p_repo.enabled
+ except:
+ drpm_enabled = False
+
chosen_drpm = None
# First part of key when matching drpms
@@ -44,7 +50,7 @@ def find_available_drpms(conduit, newpkg):
else:
is_local = False
- if is_installed and p_repo.enabled and not is_local:
+ if is_installed and drpm_enabled and not is_local:
for oldpkg in installed:
# Generate second part of key for matching drpms, then full key
key2 = "%s*%s*%i*%s*%s" % (oldpkg.name, oldpkg.arch, int(oldpkg.epoch), oldpkg.version, oldpkg.release)