forked from openlp/openlp
more FTW fixes
This commit is contained in:
parent
04bbeead56
commit
18c3574cfe
@ -303,9 +303,9 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard):
|
|||||||
``url``
|
``url``
|
||||||
The URL of the file we want to download.
|
The URL of the file we want to download.
|
||||||
"""
|
"""
|
||||||
site = urllib.urlopen(url)
|
site = urllib.request.urlopen(url)
|
||||||
meta = site.info()
|
meta = site.info()
|
||||||
return int(meta.getheaders("Content-Length")[0])
|
return int(meta.get("Content-Length"))
|
||||||
|
|
||||||
def _download_progress(self, count, block_size):
|
def _download_progress(self, count, block_size):
|
||||||
"""
|
"""
|
||||||
|
@ -41,7 +41,6 @@ from PyQt4 import QtCore, QtGui
|
|||||||
from openlp.core.lib import Plugin, StringContent, UiStrings, build_icon, translate
|
from openlp.core.lib import Plugin, StringContent, UiStrings, build_icon, translate
|
||||||
from openlp.core.lib.db import Manager
|
from openlp.core.lib.db import Manager
|
||||||
from openlp.core.lib.ui import create_action
|
from openlp.core.lib.ui import create_action
|
||||||
from openlp.core.utils import get_filesystem_encoding
|
|
||||||
from openlp.core.utils.actions import ActionList
|
from openlp.core.utils.actions import ActionList
|
||||||
from openlp.plugins.songs.lib import clean_song, upgrade
|
from openlp.plugins.songs.lib import clean_song, upgrade
|
||||||
from openlp.plugins.songs.lib.db import init_schema, Song
|
from openlp.plugins.songs.lib.db import init_schema, Song
|
||||||
@ -263,7 +262,7 @@ class SongsPlugin(Plugin):
|
|||||||
self.application.process_events()
|
self.application.process_events()
|
||||||
self.on_tools_reindex_item_triggered()
|
self.on_tools_reindex_item_triggered()
|
||||||
self.application.process_events()
|
self.application.process_events()
|
||||||
db_dir = unicode(os.path.join(unicode(gettempdir(), get_filesystem_encoding()), u'openlp'))
|
db_dir = os.path.join(gettempdir(), u'openlp')
|
||||||
if not os.path.exists(db_dir):
|
if not os.path.exists(db_dir):
|
||||||
return
|
return
|
||||||
song_dbs = []
|
song_dbs = []
|
||||||
|
Loading…
Reference in New Issue
Block a user