Merge lp:~francesco-marella/entertainer/fix-bug-315247 into lp:entertainer

Proposed by Francesco Marella
Status: Merged
Approved by: Matt Layman
Approved revision: 407
Merged at revision: 411
Proposed branch: lp:~francesco-marella/entertainer/fix-bug-315247
Merge into: lp:entertainer
Diff against target: 35 lines (+3/-0)
3 files modified
entertainerlib/backend/components/mediacache/image_cache.py (+1/-0)
entertainerlib/backend/components/mediacache/music_cache.py (+1/-0)
entertainerlib/backend/components/mediacache/video_cache.py (+1/-0)
To merge this branch: bzr merge lp:~francesco-marella/entertainer/fix-bug-315247
Reviewer Review Type Date Requested Status
Matt Layman Approve
Review via email: mp+22966@code.launchpad.net

Commit message

Make pysqlite always return bytestrings (Closes LP: #315247) (Francesco Marella)

To post a comment you must log in.
Revision history for this message
Matt Layman (mblayman) wrote :

Francesco,

Thanks for taking a stab at this. This same solution was proposed by Samuel Buffet some number of months ago, and, at the time, was rejected by Paul for reasons that I can't recall.

Frankly, I don't have a problem with it as a temporary solutions. I think that some of Paul's objections had to do with Unicode issues, but I don't think that's a big problem for now. My next big focus after I get a 0.5.1 release pushed out to a PPA is to focus on cleaning up the backend. That cleanup will include doing the conversion to use Storm and to eliminate a lot of the threading (serializing all backend processing for now) so that we can move to using twisted with threading issues.

So I'll approve the branch and merge it because it will be a suitable fix for now.

Thanks,
Matt

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'entertainerlib/backend/components/mediacache/image_cache.py'
2--- entertainerlib/backend/components/mediacache/image_cache.py 2009-08-16 18:51:06 +0000
3+++ entertainerlib/backend/components/mediacache/image_cache.py 2010-04-07 19:20:31 +0000
4@@ -41,6 +41,7 @@
5 if not os.path.exists(self.config.IMAGE_DB):
6 self._createImageCacheDatabase()
7 self.db_conn = sqlite.connect(self.config.IMAGE_DB)
8+ self.db_conn.text_factory = str
9 self.db_cursor = self.db_conn.cursor()
10
11 def clearCache(self):
12
13=== modified file 'entertainerlib/backend/components/mediacache/music_cache.py'
14--- entertainerlib/backend/components/mediacache/music_cache.py 2009-08-18 02:50:40 +0000
15+++ entertainerlib/backend/components/mediacache/music_cache.py 2010-04-07 19:20:31 +0000
16@@ -42,6 +42,7 @@
17 if not os.path.exists(self.config.MUSIC_DB):
18 self.__createMusicCacheDatabase()
19 self.__db_conn = sqlite.connect(self.config.MUSIC_DB)
20+ self.__db_conn.text_factory = str
21 self.__db_cursor = self.__db_conn.cursor()
22
23 def clearCache(self):
24
25=== modified file 'entertainerlib/backend/components/mediacache/video_cache.py'
26--- entertainerlib/backend/components/mediacache/video_cache.py 2009-08-18 02:45:02 +0000
27+++ entertainerlib/backend/components/mediacache/video_cache.py 2010-04-07 19:20:31 +0000
28@@ -36,6 +36,7 @@
29 if not os.path.exists(self.config.VIDEO_DB):
30 self.__createVideoCacheDatabase()
31 self.__db_conn = sqlite.connect(self.config.VIDEO_DB)
32+ self.__db_conn.text_factory = str
33 self.__db_cursor = self.__db_conn.cursor()
34
35 def clearCache(self):

Subscribers

People subscribed via source and target branches