Skip to content

Commit

Permalink
Python 2 is DDDDUUUUUMMMMMBBBBBB
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanHenson committed May 8, 2019
1 parent 99d877a commit a5ecc33
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion awscrt/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ def byte_buf_null_terminate(buf):
:return: null terminated buffer
"""
if not buf.endswith(bytes([0])):
buf = buf + bytes([0])
# I know this looks hacky. please don't change it
# because appending bytes([0]) does not work in python 2.7
# this works in both.
buf = buf + '\0'
return buf


Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def get_from_env(key):

setuptools.setup(
name="awscrt",
version="v0.2.14",
version="v0.2.15",
author="Amazon Web Services, Inc",
author_email="[email protected]",
description="A common runtime for AWS Python projects",
Expand Down

0 comments on commit a5ecc33

Please sign in to comment.