diff --git a/openlp/core/lib/db.py b/openlp/core/lib/db.py index 0ebb554a2..a160fec43 100644 --- a/openlp/core/lib/db.py +++ b/openlp/core/lib/db.py @@ -87,7 +87,8 @@ class BaseModel(object): Creates an instance of a class and populates it, returning the instance """ instance = cls() - [instance.__setattr__(key, kwargs[key]) for key in kwargs] + for key, value in kwargs.iteritems(): + instance.__setattr__(key, value) return instance diff --git a/openlp/core/lib/toolbar.py b/openlp/core/lib/toolbar.py index c3dc8236c..d2b37df51 100644 --- a/openlp/core/lib/toolbar.py +++ b/openlp/core/lib/toolbar.py @@ -140,7 +140,8 @@ class OpenLPToolbar(QtGui.QToolBar): ``widgets`` The list of names of widgets to be hidden. """ - [self.actions[widget].setVisible(False) for widget in widgets] + for widget in widgets: + self.actions[widget].setVisible(False) def makeWidgetsVisible(self, widgets): """ @@ -149,7 +150,8 @@ class OpenLPToolbar(QtGui.QToolBar): ``widgets`` The list of names of widgets to be shown. """ - [self.actions[widget].setVisible(True) for widget in widgets] + for widget in widgets: + self.actions[widget].setVisible(True) def addPushButton(self, image_file=None, text=u''): """