diff options
author | Jonathan Dieter <jdieter@gmail.com> | 2007-03-26 19:11:16 +0300 |
---|---|---|
committer | Jonathan Dieter <jdieter@gmail.com> | 2007-03-26 19:11:16 +0300 |
commit | 3992e73e569d1ab8f31fcd0829e8ddd2c51c684a (patch) | |
tree | e828762ba9f23ce35c08c15af09c510c4fe332b9 /shared/prestoTransaction.py | |
parent | bed4147fd41e2d458a5be66d4937f4b9ddd1523e (diff) | |
download | presto-3992e73e569d1ab8f31fcd0829e8ddd2c51c684a.tar.gz presto-3992e73e569d1ab8f31fcd0829e8ddd2c51c684a.tar.xz presto-3992e73e569d1ab8f31fcd0829e8ddd2c51c684a.zip |
Fix bug where we sometimes die if delta repository doesn't exist (Second try)
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Diffstat (limited to 'shared/prestoTransaction.py')
-rw-r--r-- | shared/prestoTransaction.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/shared/prestoTransaction.py b/shared/prestoTransaction.py index 8a46211..71b90f3 100644 --- a/shared/prestoTransaction.py +++ b/shared/prestoTransaction.py @@ -29,8 +29,14 @@ def find_available_drpms(conduit, newpkg): try: p_repo = newpkg.po.repo.p_repo drpm_enabled = p_repo.enabled + if os.path.exists(newpkg.po.localpath): + is_local = True + else: + is_local = False except: + conduit.info(5, "No Presto repository information for %s.%s %i:%s-%s" % (newpkg.name, newpkg.arch, int(newpkg.epoch), newpkg.version, newpkg.release)) drpm_enabled = False + is_local = False chosen_drpm = None @@ -45,10 +51,6 @@ def find_available_drpms(conduit, newpkg): else: is_installed = True - if os.path.exists(newpkg.po.localpath): - is_local = True - else: - is_local = False if is_installed and drpm_enabled and not is_local: for oldpkg in installed: @@ -78,4 +80,4 @@ def find_available_drpms(conduit, newpkg): except: conduit.info(5, "Verification of %s failed" % seq) - return (chosen_drpm, installed, is_local) + return (chosen_drpm, installed, is_local, drpm_enabled) |