Skip to content

Commit

Permalink
add nocover for PY3
Browse files Browse the repository at this point in the history
  • Loading branch information
thefab committed Sep 4, 2014
1 parent e4be5b3 commit cc299d5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tornadis/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def format_args_in_redis_protocol(*args):
l = "*%d" % len(args)
if six.PY2:
lines = [l]
else:
else: # pragma: no cover
lines = [l.encode('utf-8')]
for arg in args:
if isinstance(arg, six.text_type):
Expand All @@ -29,14 +29,14 @@ def format_args_in_redis_protocol(*args):
tmp = "%d" % arg
if six.PY2:
arg = tmp
else:
else: # pragma: no cover
arg = tmp.encode('utf-8')
else:
raise Exception("don't know what to do with %s" % type(arg))
l = "$%d" % len(arg)
if six.PY2:
lines.append(l)
else:
else: # pragma: no cover
lines.append(l.encode('utf-8'))
lines.append(arg)
lines.append(b"")
Expand Down

0 comments on commit cc299d5

Please sign in to comment.