Merge lp:~j-romuald/meliae/fix-str into lp:meliae

Proposed by Romuald Brunet
Status: Merged
Approved by: John A Meinel
Approved revision: 200
Merged at revision: 201
Proposed branch: lp:~j-romuald/meliae/fix-str
Merge into: lp:meliae
Diff against target: 12 lines (+1/-1)
1 file modified
meliae/loader.py (+1/-1)
To merge this branch: bzr merge lp:~j-romuald/meliae/fix-str
Reviewer Review Type Date Requested Status
John A Meinel Approve
Review via email: mp+245633@code.launchpad.net

Description of the change

Use basestring instead of str for class check in meliae.loader("filename")

Otherwise, the loader will try to use the unicode string as if it were the JSON contents

To post a comment you must log in.
Revision history for this message
John A Meinel (jameinel) wrote :

I realize this is way too late, but might as well pull this in with the other changes.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'meliae/loader.py'
2--- meliae/loader.py 2013-05-19 06:13:48 +0000
3+++ meliae/loader.py 2015-01-06 10:10:33 +0000
4@@ -525,7 +525,7 @@
5 :param max_parents: See ObjManager.__init__(max_parents)
6 """
7 cleanup = None
8- if isinstance(source, str):
9+ if isinstance(source, basestring):
10 source, cleanup = files.open_file(source)
11 if isinstance(source, file):
12 input_size = os.fstat(source.fileno()).st_size

Subscribers

People subscribed via source and target branches

to all changes: