Skip to content

Commit

Permalink
fix pass None to tob (#1018)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanaasagi authored and defnull committed Dec 9, 2017
1 parent 459b8e9 commit 06cc47b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bottle.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def _raise(*a):
def tob(s, enc='utf8'):
if isinstance(s, unicode):
return s.encode(enc)
return bytes("" if s is None else s)
return b'' if s is None else bytes(s)


def touni(s, enc='utf8', err='strict'):
Expand Down

0 comments on commit 06cc47b

Please sign in to comment.