add missing imports

This commit is contained in:
Tim Bentley 2013-06-23 20:51:17 +01:00
parent 4d1061f723
commit d32ece04a5
7 changed files with 15 additions and 3 deletions

View File

@ -30,6 +30,7 @@
Provide the generic plugin functionality for OpenLP plugins. Provide the generic plugin functionality for OpenLP plugins.
""" """
import logging import logging
import os
from PyQt4 import QtCore from PyQt4 import QtCore
@ -424,8 +425,11 @@ class Plugin(QtCore.QObject):
""" """
Adds the openlp to the class dynamically Adds the openlp to the class dynamically
""" """
if not hasattr(self, u'_application'): if os.name == u'nt':
self._application = Registry().get(u'application') Registry().get(u'application')
return self._application else:
if not hasattr(self, u'_application'):
self._application = Registry().get(u'application')
return self._application
application = property(_get_application) application = property(_get_application)

View File

@ -38,6 +38,7 @@ Some of the code for this form is based on the examples at:
from __future__ import division from __future__ import division
import cgi import cgi
import logging import logging
import os
import sys import sys
from PyQt4 import QtCore, QtGui, QtWebKit, QtOpenGL from PyQt4 import QtCore, QtGui, QtWebKit, QtOpenGL

View File

@ -29,6 +29,8 @@
""" """
The :mod:`~openlp.core.ui.media.mediaplayer` module contains the MediaPlayer class. The :mod:`~openlp.core.ui.media.mediaplayer` module contains the MediaPlayer class.
""" """
import os
from openlp.core.lib import Registry from openlp.core.lib import Registry
from openlp.core.ui.media import MediaState from openlp.core.ui.media import MediaState

View File

@ -30,6 +30,7 @@
The actual plugin view form The actual plugin view form
""" """
import logging import logging
import os
from PyQt4 import QtGui from PyQt4 import QtGui

View File

@ -28,6 +28,7 @@
############################################################################### ###############################################################################
import logging import logging
import os
import re import re
from PyQt4 import QtGui from PyQt4 import QtGui

View File

@ -29,6 +29,7 @@
""" """
The :mod:`http` module enables OpenLP to retrieve scripture from bible websites. The :mod:`http` module enables OpenLP to retrieve scripture from bible websites.
""" """
import os
import logging import logging
import re import re
import socket import socket
@ -691,6 +692,7 @@ class HTTPBible(BibleDB):
application = property(_get_application) application = property(_get_application)
def get_soup_for_bible_ref(reference_url, header=None, pre_parse_regex=None, pre_parse_substitute=None): def get_soup_for_bible_ref(reference_url, header=None, pre_parse_regex=None, pre_parse_substitute=None):
""" """
Gets a webpage and returns a parsed and optionally cleaned soup or None. Gets a webpage and returns a parsed and optionally cleaned soup or None.

View File

@ -27,6 +27,7 @@
# Temple Place, Suite 330, Boston, MA 02111-1307 USA # # Temple Place, Suite 330, Boston, MA 02111-1307 USA #
############################################################################### ###############################################################################
import logging import logging
import os
from PyQt4 import QtGui, QtCore from PyQt4 import QtGui, QtCore
from sqlalchemy.sql import and_ from sqlalchemy.sql import and_