From 6313f1eb4da5f82677712ec3fa34e98726b3a0dc Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Fri, 2 Jan 2009 12:42:45 +0000 Subject: [PATCH] Ignore off-line mode setting when the user explicitly clicks Refresh --- zeroinstall/injector/policy.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/zeroinstall/injector/policy.py b/zeroinstall/injector/policy.py index 2457a4a..ef9f126 100644 --- a/zeroinstall/injector/policy.py +++ b/zeroinstall/injector/policy.py @@ -325,18 +325,20 @@ class Policy(object): if self.solver.ready and not force: break else: + if self.network_use == network_offline and not force: + info("Can't choose versions and in off-line mode, so aborting") + break # Once we've starting downloading some things, # we might as well get them all. force = True - if not self.network_use == network_offline: - for f in self.solver.feeds_used: - if f in downloads_finished or f in downloads_in_progress: - continue - if f.startswith('/'): - continue - feed = iface_cache.get_interface(f) - downloads_in_progress[f] = self.fetcher.download_and_import_feed(f, iface_cache) + for f in self.solver.feeds_used: + if f in downloads_finished or f in downloads_in_progress: + continue + if f.startswith('/'): + continue + feed = iface_cache.get_interface(f) + downloads_in_progress[f] = self.fetcher.download_and_import_feed(f, iface_cache) if not downloads_in_progress: break -- 2.11.4.GIT