From 1eb4c7756fbe10a3a77636f7c720ffa200a9a64e Mon Sep 17 00:00:00 2001 From: Michael Stone Date: Fri, 21 Jan 2011 20:32:06 +0000 Subject: 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 [rebased on mainline/master] Signed-off-by: Sascha Silbe Reviewed-By: Sascha Silbe Reviewed-by: Aleksey Lim --- diff --git a/extensions/cpsection/updater/model.py b/extensions/cpsection/updater/model.py index 77cc873..57d6ace 100755 --- a/extensions/cpsection/updater/model.py +++ b/extensions/cpsection/updater/model.py @@ -65,8 +65,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): -- cgit v0.9.1