Fix class defs and name redefinitions

This commit is contained in:
Jon Tibble 2010-05-25 15:30:34 +01:00
parent a2448e36da
commit c7d420d4b9
8 changed files with 13 additions and 13 deletions

View File

@ -230,7 +230,7 @@ class EventReceiver(QtCore.QObject):
self.emit(QtCore.SIGNAL(event), msg) 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 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 is a static wrapper around the ``EventReceiver`` class. As there is only

View File

@ -27,7 +27,7 @@ import logging
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
class Display(): class Display(object):
log.info(u'Display Class loaded') log.info(u'Display Class loaded')
@staticmethod @staticmethod

View File

@ -27,7 +27,6 @@ import os
import sys import sys
import sqlite3 import sqlite3
from sqlalchemy import *
from sqlalchemy import create_engine from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker, mapper from sqlalchemy.orm import scoped_session, sessionmaker, mapper
@ -93,7 +92,7 @@ def init_models(url):
autocommit=False, bind=engine)) autocommit=False, bind=engine))
return session return session
class MigrateBibles(): class MigrateBibles(object):
def __init__(self, display): def __init__(self, display):
self.display = display self.display = display
self.data_path = AppLocation.get_section_data_path(u'bibles') self.data_path = AppLocation.get_section_data_path(u'bibles')

View File

@ -25,7 +25,7 @@
from openlp.core.utils import AppLocation from openlp.core.utils import AppLocation
class MigrateFiles(): class MigrateFiles(object):
def __init__(self, display): def __init__(self, display):
self.display = display self.display = display

View File

@ -94,7 +94,7 @@ class TSongAuthor(BaseModel):
""" """
pass pass
class MigrateSongs(): class MigrateSongs(object):
def __init__(self, display): def __init__(self, display):
self.display = display self.display = display
self.data_path = AppLocation.get_section_data_path(u'songs') self.data_path = AppLocation.get_section_data_path(u'songs')

View File

@ -32,7 +32,7 @@ from openlp.plugins.alerts.lib.models import init_models, metadata, AlertItem
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
class DBManager(): class DBManager(object):
""" """
The Song Manager provides a central location for all database code. This 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. 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() 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 Saves a Alert show to the database
""" """
log.debug(u'Alert added') log.debug(u'Alert added')
try: try:
self.session.add(AlertItem) self.session.add(alert_item)
self.session.commit() self.session.commit()
log.debug(u'Alert saved') log.debug(u'Alert saved')
return True return True
@ -99,9 +99,9 @@ class DBManager():
Delete a Alert show Delete a Alert show
""" """
if id != 0: if id != 0:
AlertItem = self.get_alert(id) alert_item = self.get_alert(id)
try: try:
self.session.delete(AlertItem) self.session.delete(alert_item)
self.session.commit() self.session.commit()
return True return True
except: except:
@ -110,3 +110,4 @@ class DBManager():
return False return False
else: else:
return True return True

View File

@ -32,7 +32,7 @@ from openlp.plugins.custom.lib.models import init_models, metadata, CustomSlide
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
class CustomManager(): class CustomManager(object):
""" """
The Song Manager provides a central location for all database code. This 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. class takes care of connecting to the database and running all the queries.

View File

@ -33,7 +33,7 @@ from openlp.plugins.songusage.lib.models import init_models, metadata, \
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
class SongUsageManager(): class SongUsageManager(object):
""" """
The Song Manager provides a central location for all database code. This 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. class takes care of connecting to the database and running all the queries.