From ddc21607f0ac083fcd240e3dc7a186e5e294b2dd Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Fri, 16 May 2008 12:12:54 +0200 Subject: [PATCH] Allow to conditionally implement sortable revision in the fetcher --- lib/bb/fetch/__init__.py | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/lib/bb/fetch/__init__.py b/lib/bb/fetch/__init__.py index c3bea44..4a0d091 100644 --- a/lib/bb/fetch/__init__.py +++ b/lib/bb/fetch/__init__.py @@ -510,8 +510,14 @@ class Fetch(object): """ """ - if hasattr(self, "_sortable_revision"): + has_want_sortable = hasattr(self, "_want_sortable_revision") + has_sortable = hasattr(self, "_sortable_revision") + + if not has_want_sortable and has_sortable: + return self._sortable_revision(url, ud, d) + elif has_want_sortable and self._want_sortable_revision(url, ud, d) and has_sortable: return self._sortable_revision(url, ud, d) + pd = persist_data.PersistData(d) key = self._revision_key(url, ud, d) -- 1.5.4.3