summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--yum-presto/ChangeLog4
-rw-r--r--yum-presto/presto.py13
2 files changed, 11 insertions, 6 deletions
diff --git a/yum-presto/ChangeLog b/yum-presto/ChangeLog
index 0007bf7..0486cde 100644
--- a/yum-presto/ChangeLog
+++ b/yum-presto/ChangeLog
@@ -1,3 +1,7 @@
+* Mon Jul 30 2007 Jonathan Dieter <jdieter@gmail.com> - 0.4.1
+ - Applied small patch by Luke Macken to fix problems when not run directly
+ from yum.
+
* Wed Jul 11 2007 Jonathan Dieter <jdieter@gmail.com> - 0.4.0
- Complete rewrite by Jeremy Katz.
- Many old options and features removed in preparation for use as part of
diff --git a/yum-presto/presto.py b/yum-presto/presto.py
index 255372c..641e775 100644
--- a/yum-presto/presto.py
+++ b/yum-presto/presto.py
@@ -356,14 +356,15 @@ class PrestoParser(object):
def config_hook(conduit):
# Add --disable-presto option
parser = conduit.getOptParser()
- parser.add_option('', '--disablepresto', dest='disablepresto',
- action='store_true', default=False,
- help="disable Presto plugin and don't download any deltarpms")
-
+ if parser:
+ parser.add_option('', '--disablepresto', dest='disablepresto',
+ action='store_true', default=False,
+ help="disable Presto plugin and don't download any deltarpms")
+
# Set up Presto repositories
def postreposetup_hook(conduit):
opts, commands = conduit.getCmdLine()
- if not opts.disablepresto:
+ if not opts or not opts.disablepresto:
conduit.info(2, 'Setting up and reading Presto delta metadata')
for active_repo in conduit.getRepos().listEnabled():
try:
@@ -378,7 +379,7 @@ def postreposetup_hook(conduit):
def predownload_hook(conduit):
opts, commands = conduit.getCmdLine()
- if opts.disablepresto or len(conduit.getDownloadPackages()) == 0:
+ if (opts and opts.disablepresto) or len(conduit.getDownloadPackages()) == 0:
return
conduit.info(2, "Downloading DeltaRPMs:")