# HG changeset patch # User Brian Neal # Date 1431806524 18000 # Node ID f2fbe2b0d25d604abb3a8e4733c668e603319d1c # Parent 49646a78e965bd9cdcd4b65364a5c1a5df693755 Use unicode to log messages. diff -r 49646a78e965 -r f2fbe2b0d25d oembed/management/commands/oembed_refresh.py --- a/oembed/management/commands/oembed_refresh.py Sat May 16 14:36:31 2015 -0500 +++ b/oembed/management/commands/oembed_refresh.py Sat May 16 15:02:04 2015 -0500 @@ -49,7 +49,7 @@ endpoint = p.api_endpoint break else: - logger.error("No provider found for %s", oembed) + logger.error(u"No provider found for %s", oembed) return html = None @@ -60,18 +60,18 @@ scheme='https') except urllib2.HTTPError as ex: if 400 <= ex.code < 500: - logger.error("Server could not handle request for %s: %d", oembed, ex.code) + logger.error(u"Server could not handle request for %s: %d", oembed, ex.code) html = error_html(oembed) else: - logger.critical("Server error during request for %s: %d", oembed, ex.code) + logger.critical(u"Server error during request for %s: %d", oembed, ex.code) except urllib2.URLError as ex: - logger.critical("Failed to reach provider for %s: %s", oembed, ex.reason) + logger.critical(u"Failed to reach provider for %s: %s", oembed, ex.reason) else: html = result['html'] if html: - logger.info("Updating %s", oembed) + logger.info(u"Updating %s", oembed) oembed.html = html oembed.save()