openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #24134
[Merge] lp:~phill-ridout/openlp/bug1336036 into lp:openlp
Phill has proposed merging lp:~phill-ridout/openlp/bug1336036 into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Related bugs:
Bug #1336036 in OpenLP: "log.warn is depreciated"
https://bugs.launchpad.net/openlp/+bug/1336036
For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/bug1336036/+merge/232276
fix 1336036 log.warn is depreciated
lp:~phill-ridout/openlp/bug1336036 (revision 2397)
[SUCCESS] http://ci.openlp.org/job/Branch-01-Pull/592/
[SUCCESS] http://ci.openlp.org/job/Branch-02-Functional-Tests/541/
[SUCCESS] http://ci.openlp.org/job/Branch-03-Interface-Tests/485/
[SUCCESS] http://ci.openlp.org/job/Branch-04a-Windows_Functional_Tests/445/
[SUCCESS] http://ci.openlp.org/job/Branch-04b-Windows_Interface_Tests/57/
[SUCCESS] http://ci.openlp.org/job/Branch-05a-Code_Analysis/274/
[SUCCESS] http://ci.openlp.org/job/Branch-05b-Test_Coverage/148/
--
https://code.launchpad.net/~phill-ridout/openlp/bug1336036/+merge/232276
Your team OpenLP Core is requested to review the proposed merge of lp:~phill-ridout/openlp/bug1336036 into lp:openlp.
=== modified file 'openlp/core/lib/toolbar.py'
--- openlp/core/lib/toolbar.py 2014-03-17 19:05:55 +0000
+++ openlp/core/lib/toolbar.py 2014-08-26 17:44:32 +0000
@@ -81,4 +81,4 @@
if handle in self.actions:
self.actions[handle].setVisible(visible)
else:
- log.warn('No handle "%s" in actions list.', str(handle))
+ log.warning('No handle "%s" in actions list.', str(handle))
=== modified file 'openlp/core/lib/ui.py'
--- openlp/core/lib/ui.py 2014-05-07 11:00:34 +0000
+++ openlp/core/lib/ui.py 2014-08-26 17:44:32 +0000
@@ -172,7 +172,7 @@
kwargs.setdefault('icon', ':/services/service_down.png')
kwargs.setdefault('tooltip', translate('OpenLP.Ui', 'Move selection down one position.'))
else:
- log.warn('The role "%s" is not defined in create_push_button().', role)
+ log.warning('The role "%s" is not defined in create_push_button().', role)
if kwargs.pop('btn_class', '') == 'toolbutton':
button = QtGui.QToolButton(parent)
else:
@@ -190,7 +190,7 @@
button.clicked.connect(kwargs.pop('click'))
for key in list(kwargs.keys()):
if key not in ['text', 'icon', 'tooltip', 'click']:
- log.warn('Parameter %s was not consumed in create_button().', key)
+ log.warning('Parameter %s was not consumed in create_button().', key)
return button
@@ -275,7 +275,7 @@
action.triggered.connect(kwargs.pop('triggers'))
for key in list(kwargs.keys()):
if key not in ['text', 'icon', 'tooltip', 'statustip', 'checked', 'can_shortcuts', 'category', 'triggers']:
- log.warn('Parameter %s was not consumed in create_action().' % key)
+ log.warning('Parameter %s was not consumed in create_action().' % key)
return action
=== modified file 'openlp/core/ui/media/mediacontroller.py'
--- openlp/core/ui/media/mediacontroller.py 2014-04-14 19:44:35 +0000
+++ openlp/core/ui/media/mediacontroller.py 2014-08-26 17:44:32 +0000
@@ -175,7 +175,7 @@
# On some platforms importing vlc.py might cause
# also OSError exceptions. (e.g. Mac OS X)
except (ImportError, OSError):
- log.warn('Failed to import %s on path %s', module_name, path)
+ log.warning('Failed to import %s on path %s', module_name, path)
player_classes = MediaPlayer.__subclasses__()
for player_class in player_classes:
player = player_class(self)
=== modified file 'openlp/core/utils/actions.py'
--- openlp/core/utils/actions.py 2014-04-26 17:40:26 +0000
+++ openlp/core/utils/actions.py 2014-08-26 17:44:32 +0000
@@ -279,8 +279,8 @@
actions.append(action)
ActionList.shortcut_map[shortcuts[1]] = actions
else:
- log.warn('Shortcut "%s" is removed from "%s" because another action already uses this shortcut.' %
- (shortcuts[1], action.objectName()))
+ log.warning('Shortcut "%s" is removed from "%s" because another action already uses this shortcut.' %
+ (shortcuts[1], action.objectName()))
shortcuts.remove(shortcuts[1])
# Check the primary shortcut.
existing_actions = ActionList.shortcut_map.get(shortcuts[0], [])
@@ -290,8 +290,8 @@
actions.append(action)
ActionList.shortcut_map[shortcuts[0]] = actions
else:
- log.warn('Shortcut "%s" is removed from "%s" because another action already uses this shortcut.' %
- (shortcuts[0], action.objectName()))
+ log.warning('Shortcut "%s" is removed from "%s" because another action already uses this shortcut.' %
+ (shortcuts[0], action.objectName()))
shortcuts.remove(shortcuts[0])
action.setShortcuts([QtGui.QKeySequence(shortcut) for shortcut in shortcuts])
=== modified file 'openlp/plugins/bibles/forms/bibleupgradeform.py'
--- openlp/plugins/bibles/forms/bibleupgradeform.py 2014-04-15 08:30:04 +0000
+++ openlp/plugins/bibles/forms/bibleupgradeform.py 2014-08-26 17:44:32 +0000
@@ -423,7 +423,7 @@
else:
language_id = self.new_bibles[number].get_language(name)
if not language_id:
- log.warn('Upgrading from "%s" failed' % filename[0])
+ log.warning('Upgrading from "%s" failed' % filename[0])
self.new_bibles[number].session.close()
del self.new_bibles[number]
self.increment_progress_bar(
@@ -444,7 +444,7 @@
book_ref_id = self.new_bibles[number].\
get_book_ref_id_by_name(book, len(books), language_id)
if not book_ref_id:
- log.warn('Upgrading books from %s - download name: "%s" aborted by user' % (
+ log.warning('Upgrading books from %s - download name: "%s" aborted by user' % (
meta_data['download_source'], meta_data['download_name']))
self.new_bibles[number].session.close()
del self.new_bibles[number]
@@ -457,7 +457,7 @@
if oldbook:
verses = old_bible.get_verses(oldbook['id'])
if not verses:
- log.warn('No verses found to import for book "%s"', book)
+ log.warning('No verses found to import for book "%s"', book)
continue
for verse in verses:
if self.stop_import_flag:
@@ -472,7 +472,7 @@
if not language_id:
language_id = self.new_bibles[number].get_language(name)
if not language_id:
- log.warn('Upgrading books from "%s" failed' % name)
+ log.warning('Upgrading books from "%s" failed' % name)
self.new_bibles[number].session.close()
del self.new_bibles[number]
self.increment_progress_bar(
@@ -493,7 +493,7 @@
(number + 1, max_bibles, name, book['name']))
book_ref_id = self.new_bibles[number].get_book_ref_id_by_name(book['name'], len(books), language_id)
if not book_ref_id:
- log.warn('Upgrading books from %s " failed - aborted by user' % name)
+ log.warning('Upgrading books from %s " failed - aborted by user' % name)
self.new_bibles[number].session.close()
del self.new_bibles[number]
self.success[number] = False
@@ -503,7 +503,7 @@
book_details['testament_id'])
verses = old_bible.get_verses(book['id'])
if not verses:
- log.warn('No verses found to import for book "%s"', book['name'])
+ log.warning('No verses found to import for book "%s"', book['name'])
self.new_bibles[number].delete_book(db_book)
continue
for verse in verses:
=== modified file 'openlp/plugins/bibles/lib/http.py'
--- openlp/plugins/bibles/lib/http.py 2014-06-26 08:35:53 +0000
+++ openlp/plugins/bibles/lib/http.py 2014-08-26 17:44:32 +0000
@@ -165,7 +165,7 @@
if len(verse_parts) > 1:
verse = int(verse_parts[0])
except TypeError:
- log.warn('Illegal verse number: %s', str(verse))
+ log.warning('Illegal verse number: %s', str(verse))
verses.append((verse, text))
verse_list = {}
for verse, text in verses[::-1]:
@@ -198,7 +198,7 @@
if len(verse_parts) > 1:
clean_verse_num = int(verse_parts[0])
except TypeError:
- log.warn('Illegal verse number: %s', str(raw_verse_num))
+ log.warning('Illegal verse number: %s', str(raw_verse_num))
if clean_verse_num:
verse_text = raw_verse_num.next_element
part = raw_verse_num.next_element.next_element
=== modified file 'openlp/plugins/bibles/lib/opensong.py'
--- openlp/plugins/bibles/lib/opensong.py 2014-05-06 19:53:08 +0000
+++ openlp/plugins/bibles/lib/opensong.py 2014-08-26 17:44:32 +0000
@@ -123,7 +123,7 @@
if len(verse_parts) > 1:
number = int(verse_parts[0])
except TypeError:
- log.warn('Illegal verse number: %s', str(verse.attrib['n']))
+ log.warning('Illegal verse number: %s', str(verse.attrib['n']))
verse_number = number
else:
verse_number += 1
=== modified file 'openlp/plugins/presentations/lib/impresscontroller.py'
--- openlp/plugins/presentations/lib/impresscontroller.py 2014-04-12 20:19:22 +0000
+++ openlp/plugins/presentations/lib/impresscontroller.py 2014-08-26 17:44:32 +0000
@@ -129,7 +129,7 @@
try:
uno_instance = get_uno_instance(resolver)
except:
- log.warn('Unable to find running instance ')
+ log.warning('Unable to find running instance ')
self.start_process()
loop += 1
try:
@@ -138,7 +138,7 @@
desktop = self.manager.createInstanceWithContext("com.sun.star.frame.Desktop", uno_instance)
return desktop
except:
- log.warn('Failed to get UNO desktop')
+ log.warning('Failed to get UNO desktop')
return None
def get_com_desktop(self):
@@ -152,7 +152,7 @@
try:
desktop = self.manager.createInstance('com.sun.star.frame.Desktop')
except (AttributeError, pywintypes.com_error):
- log.warn('Failure to find desktop - Impress may have closed')
+ log.warning('Failure to find desktop - Impress may have closed')
return desktop if desktop else None
def get_com_servicemanager(self):
@@ -163,7 +163,7 @@
try:
return Dispatch('com.sun.star.ServiceManager')
except pywintypes.com_error:
- log.warn('Failed to get COM service manager. Impress Controller has been disabled')
+ log.warning('Failed to get COM service manager. Impress Controller has been disabled')
return None
def kill(self):
@@ -180,7 +180,7 @@
else:
desktop = self.get_com_desktop()
except:
- log.warn('Failed to find an OpenOffice desktop to terminate')
+ log.warning('Failed to find an OpenOffice desktop to terminate')
if not desktop:
return
docs = desktop.getComponents()
@@ -198,7 +198,7 @@
desktop.terminate()
log.debug('OpenOffice killed')
except:
- log.warn('Failed to terminate OpenOffice')
+ log.warning('Failed to terminate OpenOffice')
class ImpressDocument(PresentationDocument):
@@ -244,7 +244,7 @@
try:
self.document = desktop.loadComponentFromURL(url, '_blank', 0, properties)
except:
- log.warn('Failed to load presentation %s' % url)
+ log.warning('Failed to load presentation %s' % url)
return False
if os.name == 'nt':
# As we can't start minimized the Impress window gets in the way.
@@ -318,7 +318,7 @@
self.presentation = None
self.document.dispose()
except:
- log.warn("Closing presentation failed")
+ log.warning("Closing presentation failed")
self.document = None
self.controller.remove_doc(self)
@@ -335,7 +335,7 @@
log.debug("getPresentation failed to find a presentation")
return False
except:
- log.warn("getPresentation failed to find a presentation")
+ log.warning("getPresentation failed to find a presentation")
return False
return True
=== modified file 'openlp/plugins/presentations/lib/messagelistener.py'
--- openlp/plugins/presentations/lib/messagelistener.py 2014-03-08 21:23:47 +0000
+++ openlp/plugins/presentations/lib/messagelistener.py 2014-08-26 17:44:32 +0000
@@ -98,7 +98,7 @@
return True
if not self.doc.is_loaded():
if not self.doc.load_presentation():
- log.warn('Failed to activate %s' % self.doc.filepath)
+ log.warning('Failed to activate %s' % self.doc.filepath)
return False
if self.is_live:
self.doc.start_presentation()
@@ -109,7 +109,7 @@
if self.doc.is_active():
return True
else:
- log.warn('Failed to activate %s' % self.doc.filepath)
+ log.warning('Failed to activate %s' % self.doc.filepath)
return False
def slide(self, slide):
=== modified file 'openlp/plugins/presentations/presentationplugin.py'
--- openlp/plugins/presentations/presentationplugin.py 2014-04-12 20:19:22 +0000
+++ openlp/plugins/presentations/presentationplugin.py 2014-08-26 17:44:32 +0000
@@ -90,7 +90,7 @@
try:
self.controllers[controller].start_process()
except Exception:
- log.warn('Failed to start controller process')
+ log.warning('Failed to start controller process')
self.controllers[controller].available = False
self.media_item.build_file_mask_string()
@@ -134,7 +134,7 @@
try:
__import__(module_name, globals(), locals(), [])
except ImportError:
- log.warn('Failed to import %s on path %s', module_name, path)
+ log.warning('Failed to import %s on path %s', module_name, path)
controller_classes = PresentationController.__subclasses__()
for controller_class in controller_classes:
controller = controller_class(self)
=== modified file 'openlp/plugins/songs/lib/importers/songshowplus.py'
--- openlp/plugins/songs/lib/importers/songshowplus.py 2014-07-04 09:35:10 +0000
+++ openlp/plugins/songs/lib/importers/songshowplus.py 2014-08-26 17:44:32 +0000
@@ -152,7 +152,7 @@
if match:
self.ccli_number = int(match.group())
else:
- log.warn("Can't parse CCLI Number from string: %s" % self.decode(data))
+ log.warning("Can't parse CCLI Number from string: %s" % self.decode(data))
elif block_key == VERSE:
self.add_verse(self.decode(data), "%s%s" % (VerseType.tags[VerseType.Verse], verse_no))
elif block_key == CHORUS:
=== modified file 'openlp/plugins/songs/lib/importers/worshipcenterpro.py'
--- openlp/plugins/songs/lib/importers/worshipcenterpro.py 2014-07-04 09:31:06 +0000
+++ openlp/plugins/songs/lib/importers/worshipcenterpro.py 2014-08-26 17:44:32 +0000
@@ -58,7 +58,7 @@
try:
conn = pyodbc.connect('DRIVER={Microsoft Access Driver (*.mdb)};DBQ=%s' % self.import_source)
except (pyodbc.DatabaseError, pyodbc.IntegrityError, pyodbc.InternalError, pyodbc.OperationalError) as e:
- log.warn('Unable to connect the WorshipCenter Pro database %s. %s', self.import_source, str(e))
+ log.warning('Unable to connect the WorshipCenter Pro database %s. %s', self.import_source, str(e))
# Unfortunately no specific exception type
self.log_error(self.import_source, translate('SongsPlugin.WorshipCenterProImport',
'Unable to connect the WorshipCenter Pro database.'))
Follow ups