From 18c3574cfef0aad6764622e5db8bcac36abe5d9f Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Sat, 6 Jul 2013 23:18:15 +0200 Subject: [PATCH] more FTW fixes --- openlp/core/ui/firsttimeform.py | 4 ++-- openlp/plugins/songs/songsplugin.py | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/openlp/core/ui/firsttimeform.py b/openlp/core/ui/firsttimeform.py index ca00118eb..e844673ee 100644 --- a/openlp/core/ui/firsttimeform.py +++ b/openlp/core/ui/firsttimeform.py @@ -303,9 +303,9 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard): ``url`` The URL of the file we want to download. """ - site = urllib.urlopen(url) + site = urllib.request.urlopen(url) meta = site.info() - return int(meta.getheaders("Content-Length")[0]) + return int(meta.get("Content-Length")) def _download_progress(self, count, block_size): """ diff --git a/openlp/plugins/songs/songsplugin.py b/openlp/plugins/songs/songsplugin.py index 1c895d327..c9cf22534 100644 --- a/openlp/plugins/songs/songsplugin.py +++ b/openlp/plugins/songs/songsplugin.py @@ -41,7 +41,6 @@ from PyQt4 import QtCore, QtGui from openlp.core.lib import Plugin, StringContent, UiStrings, build_icon, translate from openlp.core.lib.db import Manager 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.plugins.songs.lib import clean_song, upgrade from openlp.plugins.songs.lib.db import init_schema, Song @@ -263,7 +262,7 @@ class SongsPlugin(Plugin): self.application.process_events() self.on_tools_reindex_item_triggered() 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): return song_dbs = []