forked from openlp/openlp
Fix class defs and name redefinitions
This commit is contained in:
parent
a2448e36da
commit
c7d420d4b9
|
@ -230,7 +230,7 @@ class EventReceiver(QtCore.QObject):
|
|||
self.emit(QtCore.SIGNAL(event), msg)
|
||||
|
||||
|
||||
class Receiver():
|
||||
class Receiver(object):
|
||||
"""
|
||||
Class to allow events to be passed from different parts of the system. This
|
||||
is a static wrapper around the ``EventReceiver`` class. As there is only
|
||||
|
|
|
@ -27,7 +27,7 @@ import logging
|
|||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
class Display():
|
||||
class Display(object):
|
||||
log.info(u'Display Class loaded')
|
||||
|
||||
@staticmethod
|
||||
|
|
|
@ -27,7 +27,6 @@ import os
|
|||
import sys
|
||||
import sqlite3
|
||||
|
||||
from sqlalchemy import *
|
||||
from sqlalchemy import create_engine
|
||||
from sqlalchemy.orm import scoped_session, sessionmaker, mapper
|
||||
|
||||
|
@ -93,7 +92,7 @@ def init_models(url):
|
|||
autocommit=False, bind=engine))
|
||||
return session
|
||||
|
||||
class MigrateBibles():
|
||||
class MigrateBibles(object):
|
||||
def __init__(self, display):
|
||||
self.display = display
|
||||
self.data_path = AppLocation.get_section_data_path(u'bibles')
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
from openlp.core.utils import AppLocation
|
||||
|
||||
class MigrateFiles():
|
||||
class MigrateFiles(object):
|
||||
def __init__(self, display):
|
||||
self.display = display
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ class TSongAuthor(BaseModel):
|
|||
"""
|
||||
pass
|
||||
|
||||
class MigrateSongs():
|
||||
class MigrateSongs(object):
|
||||
def __init__(self, display):
|
||||
self.display = display
|
||||
self.data_path = AppLocation.get_section_data_path(u'songs')
|
||||
|
|
|
@ -32,7 +32,7 @@ from openlp.plugins.alerts.lib.models import init_models, metadata, AlertItem
|
|||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
class DBManager():
|
||||
class DBManager(object):
|
||||
"""
|
||||
The Song Manager provides a central location for all database code. This
|
||||
class takes care of connecting to the database and running all the queries.
|
||||
|
@ -70,13 +70,13 @@ class DBManager():
|
|||
"""
|
||||
return self.session.query(AlertItem).order_by(AlertItem.text).all()
|
||||
|
||||
def save_alert(self, AlertItem):
|
||||
def save_alert(self, alert_item):
|
||||
"""
|
||||
Saves a Alert show to the database
|
||||
"""
|
||||
log.debug(u'Alert added')
|
||||
try:
|
||||
self.session.add(AlertItem)
|
||||
self.session.add(alert_item)
|
||||
self.session.commit()
|
||||
log.debug(u'Alert saved')
|
||||
return True
|
||||
|
@ -99,9 +99,9 @@ class DBManager():
|
|||
Delete a Alert show
|
||||
"""
|
||||
if id != 0:
|
||||
AlertItem = self.get_alert(id)
|
||||
alert_item = self.get_alert(id)
|
||||
try:
|
||||
self.session.delete(AlertItem)
|
||||
self.session.delete(alert_item)
|
||||
self.session.commit()
|
||||
return True
|
||||
except:
|
||||
|
@ -110,3 +110,4 @@ class DBManager():
|
|||
return False
|
||||
else:
|
||||
return True
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ from openlp.plugins.custom.lib.models import init_models, metadata, CustomSlide
|
|||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
class CustomManager():
|
||||
class CustomManager(object):
|
||||
"""
|
||||
The Song Manager provides a central location for all database code. This
|
||||
class takes care of connecting to the database and running all the queries.
|
||||
|
|
|
@ -33,7 +33,7 @@ from openlp.plugins.songusage.lib.models import init_models, metadata, \
|
|||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
class SongUsageManager():
|
||||
class SongUsageManager(object):
|
||||
"""
|
||||
The Song Manager provides a central location for all database code. This
|
||||
class takes care of connecting to the database and running all the queries.
|
||||
|
|
Loading…
Reference in New Issue