Fix #7379 (UnicodeEncodeError in Content server)

This commit is contained in:
Kovid Goyal 2010-11-01 18:28:15 -06:00
parent 389c66a4eb
commit d6d47e226f
3 changed files with 4 additions and 5 deletions

View File

@ -89,7 +89,7 @@ class Server(Command):
t = telnetlib.Telnet('localhost', 4242) t = telnetlib.Telnet('localhost', 4242)
t.read_until("repl>") t.read_until("repl>")
t.write('BrowserReload();') t.write('BrowserReload();')
print t.read_until("repl>") t.read_until("repl>")
t.close() t.close()
except: except:
print 'Failed to reload browser' print 'Failed to reload browser'

View File

@ -112,13 +112,12 @@ def get_metadata(br, asin, mi):
def main(args=sys.argv): def main(args=sys.argv):
# Test xisbn # Test xisbn
#print get_social_metadata('Learning Python', None, None, '8324616489') print get_social_metadata('Learning Python', None, None, '8324616489')
#print print
# Test sophisticated comment formatting # Test sophisticated comment formatting
print get_social_metadata('Angels & Demons', None, None, '9781416580829') print get_social_metadata('Angels & Demons', None, None, '9781416580829')
print print
return
# Random tests # Random tests
print get_social_metadata('Star Trek: Destiny: Mere Mortals', None, None, '9781416551720') print get_social_metadata('Star Trek: Destiny: Mere Mortals', None, None, '9781416551720')

View File

@ -128,7 +128,7 @@ class ContentServer(object):
if want_mobile: if want_mobile:
return self.mobile() return self.mobile()
return self.browse_toplevel() return self.browse_catalog()
def old(self, **kwargs): def old(self, **kwargs):
return self.static('index.html').replace('{prefix}', return self.static('index.html').replace('{prefix}',