finishing fixing bugs from last commit
authorJohn Ladan <jladan@uwaterloo.ca>
Tue, 22 Oct 2013 22:37:17 +0000 (18:37 -0400)
committerJohn Ladan <jladan@uwaterloo.ca>
Tue, 22 Oct 2013 22:37:17 +0000 (18:37 -0400)
bookData.py
browser.py

index ef364fc..e4c7c7a 100644 (file)
@@ -85,7 +85,7 @@ def openLibrary_lccn(LCCN):
         jsondata = urlopen("http://openlibrary.org/api/books?format=json&jscmd=data&bibkeys=lccn:"+lccn, timeout=3)
     except URLError:
         return {}
-    openBook = load(jsondata)
+    openBook = loads(jsondata.read().decode('utf-8'))
     if "lccn:"+lccn not in openBook:
         return {'lccn':lccn,'title':'Book not found'}
     openBook = openBook["lccn:"+lccn]
index f747926..0bef6f3 100644 (file)
@@ -84,7 +84,6 @@ class browserWindow:
             entry = self.entries[self.topline+row]
             cursor = 2
             self.w.addnstr(row+3, 1, " "*self.mx,self.mx-2)
-            sys.stderr.write(str(type(self.selected)))
             if self.selected[self.topline+row]:
                 self.w.addstr(row+3, 1, "*")
             else: