Date: Sun, 23 May 2010 14:50:26 -0400 From: Michael Stone To: sugar-devel@lists.sugarlabs.org Subject: [Sugar-devel] [PATCH] Simplify the definition of UpdateModel._bundles_to_check. The only purposes of the list comprehension in UpdateModel.check_updates() is to set self._bundles_to_check to a list containing the elements returned by bundleregistry.get_registry(). This purpose can be more succinctly achieved by means of the list() constructor. Signed-off-by: Michael Stone --- extensions/cpsection/updater/model.py | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/extensions/cpsection/updater/model.py b/extensions/cpsection/updater/model.py index c45dcd3..5bb8cf4 100755 --- a/extensions/cpsection/updater/model.py +++ b/extensions/cpsection/updater/model.py @@ -63,8 +63,7 @@ class UpdateModel(gobject.GObject): def check_updates(self): self.updates = [] - self._bundles_to_check = \ - [bundle for bundle in bundleregistry.get_registry()] + self._bundles_to_check = list(bundleregistry.get_registry()) self._check_next_update() def _check_next_update(self): -- 1.7.1 _______________________________________________ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel