File tree Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 1
1
History/Changelog
2
2
=================
3
3
4
+ 0.5.2: 2013-03-02
5
+ -----------------
6
+
7
+ - Stop trying to decode the byte strings returned by ``b64decode ``. Fixes #72
8
+
4
9
0.5.1: 2013-02-21
5
10
-----------------
6
11
Original file line number Diff line number Diff line change 13
13
__author__ = 'Ian Cordasco'
14
14
__license__ = 'Modified BSD'
15
15
__copyright__ = 'Copyright 2012-2013 Ian Cordasco'
16
- __version__ = '0.5.1 '
16
+ __version__ = '0.5.2 '
17
17
18
18
from github3 .api import *
19
19
from github3 .github import GitHub , GitHubEnterprise , GitHubStatus
Original file line number Diff line number Diff line change @@ -1350,10 +1350,16 @@ def __init__(self, content):
1350
1350
#: Base64-encoded content of the file.
1351
1351
self .content = content .get ('content' , '' )
1352
1352
1353
- #: Decoded content of the file.
1353
+ #: Decoded content of the file as a bytes object. If we try to decode
1354
+ #: to character set for you, we might encounter an exception which
1355
+ #: will prevent the object from being created. On python2 this is the
1356
+ #: same as a string, but on python3 you should call the decode method
1357
+ #: with the character set you wish to use, e.g.,
1358
+ #: ``content.decoded.decode('utf-8')``.
1359
+ #: .. versionchanged:: 0.5.2
1354
1360
self .decoded = self .content
1355
1361
if self .encoding == 'base64' :
1356
- self .decoded = b64decode (self .content .encode ()). decode ()
1362
+ self .decoded = b64decode (self .content .encode ())
1357
1363
1358
1364
# file name, path, and size
1359
1365
#: Name of the content.
You can’t perform that action at this time.
0 commit comments