From 039572d937a77824f91fdac3faec9a60ff782fc5 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 7 Dec 2008 18:12:19 -0800 Subject: [PATCH] Fix #1363 (Error when closing custom news source window) --- src/calibre/gui2/dialogs/user_profiles.py | 5 +++-- upload.py | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/dialogs/user_profiles.py b/src/calibre/gui2/dialogs/user_profiles.py index 005c947a94..5da604c04a 100644 --- a/src/calibre/gui2/dialogs/user_profiles.py +++ b/src/calibre/gui2/dialogs/user_profiles.py @@ -191,7 +191,7 @@ class %(classname)s(%(base_class)s): class Recipe(object): def __init__(self, title, id, recipes): - self.title = title + self.title = unicode(title) self.id = id self.text = recipes[id] def __cmp__(self, other): @@ -202,8 +202,9 @@ class %(classname)s(%(base_class)s): title, ok = QInputDialog.getItem(self, _('Pick recipe'), _('Pick the recipe to customize'), items, 0, False) if ok: + title = unicode(title) for r in recipes: - if r.title == unicode(title): + if r.title == title: try: self.available_profiles.add_item(title, (title, r.text), replace=False) except ValueError: diff --git a/upload.py b/upload.py index d005c6dbbd..a8b3ea2a3f 100644 --- a/upload.py +++ b/upload.py @@ -238,7 +238,11 @@ def stage_three(): print 'Uploading to PyPI...' check_call('rm -f dist/*') check_call('python setup.py register') + check_call('sudo rm -rf build') + os.mkdir('build') check_call('python2.5 setup.py bdist_egg --exclude-source-files upload') + shutil.rmtree('build') + os.mkdir('build') check_call('python setup.py bdist_egg --exclude-source-files upload') check_call('python setup.py sdist upload') upload_src_tarball()