Permalink
Browse files

Decode patch request data.

Refs #17.
  • Loading branch information...
1 parent d4bdc76 commit 3a33d428a3b6a20b0f8f4171099680e89f128ca0 @JNRowe committed Jan 15, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 hubugs/__init__.py
View
@@ -46,6 +46,8 @@
import argh
+from github2.request import charset_from_headers
+
from . import (template, utils)
@@ -156,7 +158,8 @@ def show(args):
else:
comments = []
if args.patch and bug.pull_request_url:
- patch = args._http.request(bug.patch_url)[1]
+ request, body = args._http.request(bug.patch_url)
+ patch = body.decode(charset_from_headers(request))
else:
patch = None
yield tmpl.render(bug=bug, comments=comments, full=True, patch=patch)

0 comments on commit 3a33d42

Please sign in to comment.