forked from openlp/openlp
removed mutable as parameters
This commit is contained in:
parent
3df730db09
commit
a72b4283bf
@ -67,7 +67,7 @@ def add_welcome_page(parent, image):
|
|||||||
parent.addPage(parent.welcomePage)
|
parent.addPage(parent.welcomePage)
|
||||||
|
|
||||||
|
|
||||||
def create_button_box(dialog, name, standard_buttons, custom_buttons=[]):
|
def create_button_box(dialog, name, standard_buttons, custom_buttons=None):
|
||||||
"""
|
"""
|
||||||
Creates a QDialogButtonBox with the given buttons. The ``accepted()`` and
|
Creates a QDialogButtonBox with the given buttons. The ``accepted()`` and
|
||||||
``rejected()`` signals of the button box are connected with the dialogs
|
``rejected()`` signals of the button box are connected with the dialogs
|
||||||
@ -88,6 +88,8 @@ def create_button_box(dialog, name, standard_buttons, custom_buttons=[]):
|
|||||||
QtGui.QAbstractButton it is added with QDialogButtonBox.ActionRole.
|
QtGui.QAbstractButton it is added with QDialogButtonBox.ActionRole.
|
||||||
Otherwhise the item has to be a tuple of a button and a ButtonRole.
|
Otherwhise the item has to be a tuple of a button and a ButtonRole.
|
||||||
"""
|
"""
|
||||||
|
if custom_buttons is None:
|
||||||
|
custom_buttons = []
|
||||||
buttons = QtGui.QDialogButtonBox.NoButton
|
buttons = QtGui.QDialogButtonBox.NoButton
|
||||||
if u'ok' in standard_buttons:
|
if u'ok' in standard_buttons:
|
||||||
buttons |= QtGui.QDialogButtonBox.Ok
|
buttons |= QtGui.QDialogButtonBox.Ok
|
||||||
|
@ -138,7 +138,9 @@ class HttpResponse(object):
|
|||||||
'Content-Type': 'text/html; charset="utf-8"\r\n'
|
'Content-Type': 'text/html; charset="utf-8"\r\n'
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self, content='', headers={}, code=None):
|
def __init__(self, content='', headers=None, code=None):
|
||||||
|
if headers is None:
|
||||||
|
headers = {}
|
||||||
self.content = content
|
self.content = content
|
||||||
for key, value in headers.iteritems():
|
for key, value in headers.iteritems():
|
||||||
self.headers[key] = value
|
self.headers[key] = value
|
||||||
|
@ -121,7 +121,7 @@ class SundayPlusImport(SongImport):
|
|||||||
end = data.find(')', i) + 1
|
end = data.find(')', i) + 1
|
||||||
value = data[i:end]
|
value = data[i:end]
|
||||||
# If we are in the main group.
|
# If we are in the main group.
|
||||||
if cell == False:
|
if not cell:
|
||||||
if name == 'title':
|
if name == 'title':
|
||||||
self.title = self.decode(self.unescape(value))
|
self.title = self.decode(self.unescape(value))
|
||||||
elif name == 'Author':
|
elif name == 'Author':
|
||||||
|
Loading…
Reference in New Issue
Block a user